|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-07-16 03:36 UTC] thbley at gmail dot com
Description:
------------
old:
$txt1="Hello World!";
$txt2="What a nice day!";
echo $txt1 . " " . $txt2;
$i = 1; $j = 2; $k = 3;
function hello() { echo "hello world"; }
new:
$txt1="Hello World!"
$txt2="What a nice day!"
echo $txt1 . " " . $txt2
$i = 1; $j = 2; $k = 3
function hello() { echo "hello world" }
Test script:
---------------
$txt1="Hello World!"
$txt2="What a nice day!"
echo $txt1 . " " . $txt2
$i = 1; $j = 2; $k = 3
function hello() { echo "hello world" }
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Semicolons were invented not by stupid people... It's interesting how would you write without semicolons the following: from($categories) ->orderBy('$v["name"]') ->groupJoin( from($products) ->where('$v["quantity"] > 0') ->orderByDescending('$v["quantity"]') ->thenBy('$v["name"]'), '$v["id"]', '$v["catId"]', 'array("name" => $v["name"], "products" => $e)' ); ???I would try these rules: do ";" if line ends with "\n" and - next token is not "->" and not an operator (-+%...) - "(", "'", "\"" are currently not open on stack and - previous token is not an operator and - start child stack if "function" token comes and - not inside "function|if|while|switch|for|foreach () {" e.g. $test = [ [], function () { // do ";" return "test" // do ";" }, ] // do ";" for must remain: for ($i=0; $i<10; $i++) {}small correction: - "(", "'", "\"", "[" are currently not open on stack and