Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PHP Parse error: syntax error, unexpected '{' in index.php on line 20
- <?php
- error_reporting(E_ALL);
- ini_set("display_errors", 1);
- include("./broken-script.php");
- $php53 = array(1, 2, 3);
- $php54 = [1, 2, 3];
- ⇑
- $result = get_whatever()["key"];
- ⇑
- protected $var["x"] = "Nope";
- ⇑
- foreach [$a as $b)
- ⇑
- function foobar[$a, $b, $c] {
- ⇑
- $var = const[123];
- ⇑
- function foobar($a, $b, $c] {
- ⇑
- $var = 2];
- $array = [1,[2,3],4,[5,6[7,[8],[9,10]],11],12]],15];
- ⇑
- ⇓ ⇓
- echo "Here comes a $wrong['array'] access";
- echo "This is only $valid[here] ...";
- echo "Use {$array['as_usual']} with curly syntax.";
- ⇓
- print "Hello " . WORLD " !";
- ⇓
- print "<a href="' . $link . '">click here</a>";
- ⌞⎽⎽⎽⎽⎽⎽⎽⎽⌟⌞⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⌟⌞⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⌟
- print "<a href="{$link}">click here</a>";
- ⇓
- make_url(login', 'open');
- array( ⇓
- "key" => "value"
- "next" => "....",
- );
- ⇓
- myfunc(123, "text", "and" "more")
- ⇓
- mysql_evil("SELECT * FROM stuffs);
- print "'ok'";
- ⇑
- ⇓
- func1()
- $var = 1 + 2; # parse error in line +2
- ⇓
- print "Here comes the value: " $value;
- ⇓
- print 4 + 7 $var;
- ⇓
- $var = array("1" => $val, $val2, $val3 $val4);
- ⇓
- function myfunc($param1, $param2 $param3, $param4)
- class xyz { ⇓
- var $value = $_GET["input"];
- ⇓
- $this->myFunc$VAR();
- ⇓
- foreach $array as $key) {
- function header_fallback($value, $expires = time() + 90000) {
- class xyz { ⇓
- var $default = get_config("xyz_default");
- <?php ⇓
- print $(document).text();
- ⇓
- if (isset(($_GET["id"]))) {
- ⇓
- callfunc(1, 2, );
- ⇓
- $var = 2 * (1 + );
- ↓ ⇓
- foreach ($array as wrong) {
- ⇓
- if (($x == $y) && (2 == true) {
- ⇓
- $var = 5 * {7 + $x};
- ⇓
- print "Hello {$world[2{]} !";
- function whatever() {
- doStuff()
- } ⇧
- function doStuff() {
- if (true) ⇦
- print "yes";
- }
- } ⇧
- ⇓
- function whatever {
- }
- ⇓
- if {
- }
- ⇓ ⇓
- echo "<a href="http://example.com">click here</a>";
- ⇓
- echo "Some text", $a_variable, "and some runaway string ;
- success("finished");
- ⇯
- $text = ’Something something..’ + ”these ain't quotes”;
- ⇓
- func1()
- function2();
- ⇓
- <?xml version="1.0"?>
- <?php
- print 123;
- <?php
- ;print 123;
- print <<< END
- Content...
- Content....
- END;
- # ↑ terminator isn't exactly at the line start
- ⇓
- if (($foo < 7) && $bar) > 5 || $baz < 9) { ... }
- ↑
- ⇓
- if (empty($_POST["var"] == 1)) {
- ⇓
- if (isset($variable !== "value")) {
- ⇓
- if ($var => 5) { ... }
- ⇓
- if ($xyz > 5 and < 100)
- ⇓
- $reult = (5 < $x < 10);
- ⇓
- print "<a href='z">Hello</a>";
- ↑
- ⇓
- $x = myfunc()
- if (true) {
- class xyz {
- if (true) {}
- foreach ($var) {}
- ⇓
- $var = array(1, 2, foreach($else as $_), 5, 6);
- ⇓
- print "Oh, " . if (true) { "you!" } . " won't work";
- // Use a ternary condition here instead, when versed enough.
- ⇓
- echo 123, echo 567, "huh?";
Add Comment
Please, Sign In to add comment