3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Point { } class Dimension { } class Rectangle { } $items = array(true, false, null, 23, 0, -26, 4.21, 0.0, -3.76, 'hello', '', array(1, 2, 3), array('', '', ''), array(), new stdClass(), new Point(), new Dimension(), new Rectangle()); echo '<table cellpadding="4" border="1"> <tr> <th>syntax</th> <th>value</th> <th>type</th> <th>empty</th> <th>boolean</th> </tr>' . "\n"; foreach($items AS $item) { $booleanValue = (boolean)$item; $empty = (empty($item) ? 'EMPTY' : '&nbsp;'); $type = gettype($item); $syntax = 'if((boolean)'; $val; if($type == boolean) { $val = ($booleanValue ? 'true' : 'false'); $syntax .= ($val . ')'); } else if($type == 'NULL') { $val = 'null'; $syntax .= 'null)'; } else if($type == double && !$booleanValue) { $val = '0.0'; $syntax .= '0.0)'; } else if($type == string) { $val = '\'' . $item . '\''; $syntax .= ($val . ')'); } else if($type == 'array') { $val = $item; $syntax .= '$array)'; } else if($type == 'object') { $val = get_class($item); $syntax .= ('$' . strtolower($val) . ')'); } else { $val = $item; $syntax .= ($val . ')'); } echo ' <tr style="color: ' . ($booleanValue ? '#006600' : '#880000') . ';"> <td><code>' . $syntax . '</code></td> <td>' . $val . '</td> <td>' . $type . '</td> <td>' . $empty . '</td> <td>' . ($booleanValue ? 'TRUE' : 'FALSE') . '</td> </tr>' . "\n"; } echo '</table>' . "\n"; ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<table cellpadding="4" border="1"> <tr> <th>syntax</th> <th>value</th> <th>type</th> <th>empty</th> <th>boolean</th> </tr> Fatal error: Uncaught Error: Undefined constant "boolean" in /in/JN5UK:28 Stack trace: #0 {main} thrown in /in/JN5UK on line 28
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
<table cellpadding="4" border="1"> <tr> <th>syntax</th> <th>value</th> <th>type</th> <th>empty</th> <th>boolean</th> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 <tr style="color: #006600;"> <td><code>if((boolean)true)</code></td> <td>true</td> <td>boolean</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)false)</code></td> <td>false</td> <td>boolean</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)null)</code></td> <td>null</td> <td>NULL</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)23)</code></td> <td>23</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)0)</code></td> <td>0</td> <td>integer</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-26)</code></td> <td>-26</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)4.21)</code></td> <td>4.21</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 <tr style="color: #880000;"> <td><code>if((boolean)0.0)</code></td> <td>0.0</td> <td>double</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-3.76)</code></td> <td>-3.76</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)'hello')</code></td> <td>'hello'</td> <td>string</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)'')</code></td> <td>''</td> <td>string</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 Notice: Array to string conversion in /in/JN5UK on line 66 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 Notice: Array to string conversion in /in/JN5UK on line 66 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 Notice: Array to string conversion in /in/JN5UK on line 66 <tr style="color: #880000;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$stdclass)</code></td> <td>stdClass</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$point)</code></td> <td>Point</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$dimension)</code></td> <td>Dimension</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$rectangle)</code></td> <td>Rectangle</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> </table>
Output for 7.3.32 - 7.3.33, 7.4.26
<table cellpadding="4" border="1"> <tr> <th>syntax</th> <th>value</th> <th>type</th> <th>empty</th> <th>boolean</th> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 <tr style="color: #006600;"> <td><code>if((boolean)true)</code></td> <td>true</td> <td>boolean</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)false)</code></td> <td>false</td> <td>boolean</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)null)</code></td> <td>null</td> <td>NULL</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)23)</code></td> <td>23</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)0)</code></td> <td>0</td> <td>integer</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-26)</code></td> <td>-26</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)4.21)</code></td> <td>4.21</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 <tr style="color: #880000;"> <td><code>if((boolean)0.0)</code></td> <td>0.0</td> <td>double</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-3.76)</code></td> <td>-3.76</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)'hello')</code></td> <td>'hello'</td> <td>string</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)'')</code></td> <td>''</td> <td>string</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>EMPTY</td> <td>FALSE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$stdclass)</code></td> <td>stdClass</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$point)</code></td> <td>Point</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$dimension)</code></td> <td>Dimension</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Warning: Use of undefined constant boolean - assumed 'boolean' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 28 Warning: Use of undefined constant double - assumed 'double' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 38 Warning: Use of undefined constant string - assumed 'string' (this will throw an Error in a future version of PHP) in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$rectangle)</code></td> <td>Rectangle</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> </table>
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25
<table cellpadding="4" border="1"> <tr> <th>syntax</th> <th>value</th> <th>type</th> <th>empty</th> <th>boolean</th> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #006600;"> <td><code>if((boolean)true)</code></td> <td>true</td> <td>boolean</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)false)</code></td> <td>false</td> <td>boolean</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)null)</code></td> <td>null</td> <td>NULL</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)23)</code></td> <td>23</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)0)</code></td> <td>0</td> <td>integer</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-26)</code></td> <td>-26</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)4.21)</code></td> <td>4.21</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 <tr style="color: #880000;"> <td><code>if((boolean)0.0)</code></td> <td>0.0</td> <td>double</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-3.76)</code></td> <td>-3.76</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)'hello')</code></td> <td>'hello'</td> <td>string</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)'')</code></td> <td>''</td> <td>string</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 Notice: Array to string conversion in /in/JN5UK on line 66 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 Notice: Array to string conversion in /in/JN5UK on line 66 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 Notice: Array to string conversion in /in/JN5UK on line 66 <tr style="color: #880000;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$stdclass)</code></td> <td>stdClass</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$point)</code></td> <td>Point</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$dimension)</code></td> <td>Dimension</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$rectangle)</code></td> <td>Rectangle</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> </table>
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
<table cellpadding="4" border="1"> <tr> <th>syntax</th> <th>value</th> <th>type</th> <th>empty</th> <th>boolean</th> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #006600;"> <td><code>if((boolean)true)</code></td> <td>true</td> <td>boolean</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)false)</code></td> <td>false</td> <td>boolean</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)null)</code></td> <td>null</td> <td>NULL</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)23)</code></td> <td>23</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)0)</code></td> <td>0</td> <td>integer</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-26)</code></td> <td>-26</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)4.21)</code></td> <td>4.21</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 <tr style="color: #880000;"> <td><code>if((boolean)0.0)</code></td> <td>0.0</td> <td>double</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-3.76)</code></td> <td>-3.76</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)'hello')</code></td> <td>'hello'</td> <td>string</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)'')</code></td> <td>''</td> <td>string</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$stdclass)</code></td> <td>stdClass</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$point)</code></td> <td>Point</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$dimension)</code></td> <td>Dimension</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$rectangle)</code></td> <td>Rectangle</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> </table>
Output for 5.0.4 - 5.0.5
<table cellpadding="4" border="1"> <tr> <th>syntax</th> <th>value</th> <th>type</th> <th>empty</th> <th>boolean</th> </tr> Notice: Undefined variable: val in /in/JN5UK on line 26 Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #006600;"> <td><code>if((boolean)true)</code></td> <td>true</td> <td>boolean</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)false)</code></td> <td>false</td> <td>boolean</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)null)</code></td> <td>null</td> <td>NULL</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)23)</code></td> <td>23</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)0)</code></td> <td>0</td> <td>integer</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-26)</code></td> <td>-26</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)4.21)</code></td> <td>4.21</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 <tr style="color: #880000;"> <td><code>if((boolean)0.0)</code></td> <td>0.0</td> <td>double</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-3.76)</code></td> <td>-3.76</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)'hello')</code></td> <td>'hello'</td> <td>string</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)'')</code></td> <td>''</td> <td>string</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$stdclass)</code></td> <td>stdClass</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$point)</code></td> <td>Point</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$dimension)</code></td> <td>Dimension</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$rectangle)</code></td> <td>Rectangle</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> </table>
Output for 5.0.0 - 5.0.3
<table cellpadding="4" border="1"> <tr> <th>syntax</th> <th>value</th> <th>type</th> <th>empty</th> <th>boolean</th> </tr> Notice: Undefined variable: val in /in/JN5UK on line 26 Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #006600;"> <td><code>if((boolean)true)</code></td> <td>true</td> <td>boolean</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)false)</code></td> <td>false</td> <td>boolean</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)null)</code></td> <td>null</td> <td>NULL</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)23)</code></td> <td>23</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)0)</code></td> <td>0</td> <td>integer</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-26)</code></td> <td>-26</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)4.21)</code></td> <td>4.21</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 <tr style="color: #880000;"> <td><code>if((boolean)0.0)</code></td> <td>0.0</td> <td>double</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-3.76)</code></td> <td>-3.76</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)'hello')</code></td> <td>'hello'</td> <td>string</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)'')</code></td> <td>''</td> <td>string</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$stdclass)</code></td> <td>stdClass</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$point)</code></td> <td>Point</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$dimension)</code></td> <td>Dimension</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$rectangle)</code></td> <td>Rectangle</td> <td>object</td> <td>&nbsp;</td> <td>TRUE</td> </tr> </table>
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9
<table cellpadding="4" border="1"> <tr> <th>syntax</th> <th>value</th> <th>type</th> <th>empty</th> <th>boolean</th> </tr> Notice: Undefined variable: val in /in/JN5UK on line 26 Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #006600;"> <td><code>if((boolean)true)</code></td> <td>true</td> <td>boolean</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)false)</code></td> <td>false</td> <td>boolean</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 <tr style="color: #880000;"> <td><code>if((boolean)null)</code></td> <td>null</td> <td>NULL</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)23)</code></td> <td>23</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)0)</code></td> <td>0</td> <td>integer</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-26)</code></td> <td>-26</td> <td>integer</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)4.21)</code></td> <td>4.21</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 <tr style="color: #880000;"> <td><code>if((boolean)0.0)</code></td> <td>0.0</td> <td>double</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)-3.76)</code></td> <td>-3.76</td> <td>double</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)'hello')</code></td> <td>'hello'</td> <td>string</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)'')</code></td> <td>''</td> <td>string</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #006600;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>&nbsp;</td> <td>TRUE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)$array)</code></td> <td>Array</td> <td>array</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)$stdclass)</code></td> <td>stdClass</td> <td>object</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)$point)</code></td> <td>point</td> <td>object</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)$dimension)</code></td> <td>dimension</td> <td>object</td> <td>EMPTY</td> <td>FALSE</td> </tr> Notice: Use of undefined constant boolean - assumed 'boolean' in /in/JN5UK on line 28 Notice: Use of undefined constant double - assumed 'double' in /in/JN5UK on line 38 Notice: Use of undefined constant string - assumed 'string' in /in/JN5UK on line 43 <tr style="color: #880000;"> <td><code>if((boolean)$rectangle)</code></td> <td>rectangle</td> <td>object</td> <td>EMPTY</td> <td>FALSE</td> </tr> </table>

preferences:
283.81 ms | 417 KiB | 331 Q