3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array(7,31,32); $str = ""; for($i=0;$i<$arr;$i++) { if($i==0){ $str = "(IF(`AmenitiesProperty`.`amenity_id` = ".$arr[$i].",1,0)"; } else { $str .= "(IF(`AmenitiesProperty`.`amenity_id` = ".$arr[$i].",".$str.",0)"; } } //IF(`AmenitiesProperty`.`amenity_id` = 7,(IF(`AmenitiesProperty`.`amenity_id` = 31,(IF(`AmenitiesProperty`.`amenity_id` = 32,1,0)),0)),0)
Output for 7.0.0 - 7.1.0
Notice: Undefined offset: 3 in /in/bbZBf on line 9 Notice: Undefined offset: 4 in /in/bbZBf on line 9 Notice: Undefined offset: 5 in /in/bbZBf on line 9 Notice: Undefined offset: 6 in /in/bbZBf on line 9 Notice: Undefined offset: 7 in /in/bbZBf on line 9 Notice: Undefined offset: 8 in /in/bbZBf on line 9 Notice: Undefined offset: 9 in /in/bbZBf on line 9 Notice: Undefined offset: 10 in /in/bbZBf on line 9 Notice: Undefined offset: 11 in /in/bbZBf on line 9 Notice: Undefined offset: 12 in /in/bbZBf on line 9 Notice: Undefined offset: 13 in /in/bbZBf on line 9 Notice: Undefined offset: 14 in /in/bbZBf on line 9 Notice: Undefined offset: 15 in /in/bbZBf on line 9 Notice: Undefined offset: 16 in /in/bbZBf on line 9 Notice: Undefined offset: 17 in /in/bbZBf on line 9 Notice: Undefined offset: 18 in /in/bbZBf on line 9 Notice: Undefined offset: 19 in /in/bbZBf on line 9 Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 46923760 bytes) in /in/bbZBf on line 9
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined index: 3 in /in/bbZBf on line 9 Notice: Undefined index: 4 in /in/bbZBf on line 9 Notice: Undefined index: 5 in /in/bbZBf on line 9 Notice: Undefined index: 6 in /in/bbZBf on line 9 Notice: Undefined index: 7 in /in/bbZBf on line 9 Notice: Undefined index: 8 in /in/bbZBf on line 9 Notice: Undefined index: 9 in /in/bbZBf on line 9 Notice: Undefined index: 10 in /in/bbZBf on line 9 Notice: Undefined index: 11 in /in/bbZBf on line 9 Notice: Undefined index: 12 in /in/bbZBf on line 9 Notice: Undefined index: 13 in /in/bbZBf on line 9 Notice: Undefined index: 14 in /in/bbZBf on line 9 Notice: Undefined index: 15 in /in/bbZBf on line 9 Notice: Undefined index: 16 in /in/bbZBf on line 9 Notice: Undefined index: 17 in /in/bbZBf on line 9 Notice: Undefined index: 18 in /in/bbZBf on line 9
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Notice: Undefined offset: 3 in /in/bbZBf on line 9 Notice: Undefined offset: 4 in /in/bbZBf on line 9 Notice: Undefined offset: 5 in /in/bbZBf on line 9 Notice: Undefined offset: 6 in /in/bbZBf on line 9 Notice: Undefined offset: 7 in /in/bbZBf on line 9 Notice: Undefined offset: 8 in /in/bbZBf on line 9 Notice: Undefined offset: 9 in /in/bbZBf on line 9 Notice: Undefined offset: 10 in /in/bbZBf on line 9 Notice: Undefined offset: 11 in /in/bbZBf on line 9 Notice: Undefined offset: 12 in /in/bbZBf on line 9 Notice: Undefined offset: 13 in /in/bbZBf on line 9 Notice: Undefined offset: 14 in /in/bbZBf on line 9 Notice: Undefined offset: 15 in /in/bbZBf on line 9 Notice: Undefined offset: 16 in /in/bbZBf on line 9 Notice: Undefined offset: 17 in /in/bbZBf on line 9 Notice: Undefined offset: 18 in /in/bbZBf on line 9 Notice: Undefined offset: 19 in /in/bbZBf on line 9 Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 23461889 bytes) in /in/bbZBf on line 9
Process exited with code 255.
Output for 5.2.1 - 5.2.17
Notice: Undefined offset: 3 in /in/bbZBf on line 9 Notice: Undefined offset: 4 in /in/bbZBf on line 9 Notice: Undefined offset: 5 in /in/bbZBf on line 9 Notice: Undefined offset: 6 in /in/bbZBf on line 9 Notice: Undefined offset: 7 in /in/bbZBf on line 9 Notice: Undefined offset: 8 in /in/bbZBf on line 9 Notice: Undefined offset: 9 in /in/bbZBf on line 9 Notice: Undefined offset: 10 in /in/bbZBf on line 9 Notice: Undefined offset: 11 in /in/bbZBf on line 9 Notice: Undefined offset: 12 in /in/bbZBf on line 9 Notice: Undefined offset: 13 in /in/bbZBf on line 9 Notice: Undefined offset: 14 in /in/bbZBf on line 9 Notice: Undefined offset: 15 in /in/bbZBf on line 9 Notice: Undefined offset: 16 in /in/bbZBf on line 9 Notice: Undefined offset: 17 in /in/bbZBf on line 9 Notice: Undefined offset: 18 in /in/bbZBf on line 9 Notice: Undefined offset: 19 in /in/bbZBf on line 9 Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 23461889 bytes) in /in/bbZBf on line 9
Process exited with code 255.
Output for 5.2.0
Notice: Undefined offset: 3 in /in/bbZBf on line 9 Notice: Undefined offset: 4 in /in/bbZBf on line 9 Notice: Undefined offset: 5 in /in/bbZBf on line 9 Notice: Undefined offset: 6 in /in/bbZBf on line 9 Notice: Undefined offset: 7 in /in/bbZBf on line 9 Notice: Undefined offset: 8 in /in/bbZBf on line 9 Notice: Undefined offset: 9 in /in/bbZBf on line 9 Notice: Undefined offset: 10 in /in/bbZBf on line 9 Notice: Undefined offset: 11 in /in/bbZBf on line 9 Notice: Undefined offset: 12 in /in/bbZBf on line 9 Notice: Undefined offset: 13 in /in/bbZBf on line 9 Notice: Undefined offset: 14 in /in/bbZBf on line 9 Notice: Undefined offset: 15 in /in/bbZBf on line 9 Notice: Undefined offset: 16 in /in/bbZBf on line 9 Notice: Undefined offset: 17 in /in/bbZBf on line 9 Notice: Undefined offset: 18 in /in/bbZBf on line 9 Notice: Undefined offset: 19 in /in/bbZBf on line 9 Notice: Undefined offset: 20 in /in/bbZBf on line 9 Notice: Undefined offset: 21 in /in/bbZBf on line 9 Notice: Undefined offset: 22 in /in/bbZBf on line 9 Notice: Undefined offset: 23 in /in/bbZBf on line 9 Fatal error: Out of memory (allocated 375914496) (tried to allocate 375390206 bytes) in /in/bbZBf on line 9
Process exited with code 255.
Output for 4.3.1 - 4.3.3, 4.3.6 - 5.0.5, 5.1.1 - 5.1.6
Notice: Undefined offset: 3 in /in/bbZBf on line 9 Notice: Undefined offset: 4 in /in/bbZBf on line 9 Notice: Undefined offset: 5 in /in/bbZBf on line 9 Notice: Undefined offset: 6 in /in/bbZBf on line 9 Notice: Undefined offset: 7 in /in/bbZBf on line 9 Notice: Undefined offset: 8 in /in/bbZBf on line 9 Notice: Undefined offset: 9 in /in/bbZBf on line 9 Notice: Undefined offset: 10 in /in/bbZBf on line 9 Notice: Undefined offset: 11 in /in/bbZBf on line 9 Notice: Undefined offset: 12 in /in/bbZBf on line 9 Notice: Undefined offset: 13 in /in/bbZBf on line 9 Notice: Undefined offset: 14 in /in/bbZBf on line 9 Notice: Undefined offset: 15 in /in/bbZBf on line 9 Notice: Undefined offset: 16 in /in/bbZBf on line 9 Notice: Undefined offset: 17 in /in/bbZBf on line 9 Notice: Undefined offset: 18 in /in/bbZBf on line 9 Notice: Undefined offset: 19 in /in/bbZBf on line 9 Notice: Undefined offset: 20 in /in/bbZBf on line 9 Notice: Undefined offset: 21 in /in/bbZBf on line 9 Notice: Undefined offset: 22 in /in/bbZBf on line 9 Notice: Undefined offset: 23 in /in/bbZBf on line 9 Notice: Undefined offset: 24 in /in/bbZBf on line 9
Process exited with code 137.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/bbZBf on line 13
Process exited with code 255.
Output for 4.3.0, 4.3.4 - 4.3.5
Notice: Undefined offset: 3 in /in/bbZBf on line 9 Notice: Undefined offset: 4 in /in/bbZBf on line 9 Notice: Undefined offset: 5 in /in/bbZBf on line 9 Notice: Undefined offset: 6 in /in/bbZBf on line 9 Notice: Undefined offset: 7 in /in/bbZBf on line 9 Notice: Undefined offset: 8 in /in/bbZBf on line 9 Notice: Undefined offset: 9 in /in/bbZBf on line 9 Notice: Undefined offset: 10 in /in/bbZBf on line 9 Notice: Undefined offset: 11 in /in/bbZBf on line 9 Notice: Undefined offset: 12 in /in/bbZBf on line 9 Notice: Undefined offset: 13 in /in/bbZBf on line 9 Notice: Undefined offset: 14 in /in/bbZBf on line 9 Notice: Undefined offset: 15 in /in/bbZBf on line 9 Notice: Undefined offset: 16 in /in/bbZBf on line 9 Notice: Undefined offset: 17 in /in/bbZBf on line 9 Notice: Undefined offset: 18 in /in/bbZBf on line 9 Notice: Undefined offset: 19 in /in/bbZBf on line 9 Notice: Undefined offset: 20 in /in/bbZBf on line 9 Notice: Undefined offset: 21 in /in/bbZBf on line 9 Notice: Undefined offset: 22 in /in/bbZBf on line 9 Notice: Undefined offset: 23 in /in/bbZBf on line 9
Process exited with code 137.