3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fields = array('name' => array(),'test' => array(),'lol' => array()); foreach($fields as $k => $v){ $max_length = $row[$k]['max_length']; $min_length = $row[$k]['min_length']; if(strlen($v) > $max_length){ echo 'max!!'; exit(); }elseif(strlen($v) < $min_length){ echo 'min!!'; exit(); }else{ echo strlen($v).'<br>'; } if(is_array($v) || ($this->serialize_bool && is_bool($v))){ $v = serialize($v); } $query .= " '".mysql_real_escape_string($v)."'"; $nr++; if($nr != count($fields)){ $query .= ','; } }
Output for git.master, git.master_jit
Warning: Undefined variable $row in /in/XAkRo on line 6 Warning: Trying to access array offset on value of type null in /in/XAkRo on line 6 Warning: Trying to access array offset on value of type null in /in/XAkRo on line 6 Warning: Undefined variable $row in /in/XAkRo on line 7 Warning: Trying to access array offset on value of type null in /in/XAkRo on line 7 Warning: Trying to access array offset on value of type null in /in/XAkRo on line 7 Fatal error: Uncaught TypeError: strlen(): Argument #1 ($str) must be of type string, array given in /in/XAkRo:9 Stack trace: #0 {main} thrown in /in/XAkRo on line 9
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $row in /in/XAkRo on line 6 Warning: Trying to access array offset on null in /in/XAkRo on line 6 Warning: Trying to access array offset on null in /in/XAkRo on line 6 Warning: Undefined variable $row in /in/XAkRo on line 7 Warning: Trying to access array offset on null in /in/XAkRo on line 7 Warning: Trying to access array offset on null in /in/XAkRo on line 7 Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /in/XAkRo:9 Stack trace: #0 {main} thrown in /in/XAkRo on line 9
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.17 ms | 401 KiB | 8 Q