DoIt(-9.34E+26); DoIt(PHP_INT_MAX + 10); DoIt(1.234567E+56); DoIt(1.234567E+106); DoIt(INF); DoIt(-INF); DoIt(NAN); DoIt(-NAN); //*/ ///* // NULL operand DoIt(NULL); // ~ not supported, so disable cod eblock in DoIt when testing //*/ //* // Boolean operands DoIt(TRUE); // ~ not supported, so disable code block in DoIt when testing DoIt(FALSE); // ~ not supported, so disable code block in DoIt when testing //*/ ///* // string operands DoIt("0"); DoIt("-43"); DoIt("123"); DoIt("0.0"); DoIt("-25.5e-10"); DoIt(""); DoIt("ABC"); //*/
+-------------------------------------------------------------+ | Copyright (c) 2014 Facebook, Inc. (http://www.facebook.com) | +-------------------------------------------------------------+ */ error_reporting(-1); function DoIt() { return 20; } $i = 10; // $i is assigned the value 10; result (10) is discarded ++$i; // $i is incremented; result (11) is discarded $i++; // $i is incremented; result (11) is discarded DoIt(); // function DoIt is called; result (return value) is discarded $i; // no side effects; result is discarded, so entirely vacuous 123; // likewise ... 34.5 * 12.6 + 11.987; TRUE; while ($i-- > 0) { // null statement } $i = 10; while ($i-- > 0) { continue; // in this context, equivalent to using a null statement }