3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $condition_string = '1==0 AND 1==1'; var_dump($parts); list($a,$b) = explode(' AND ',$condition_string); list($x,$y) = strtok('==',$a); list($m,$n) = explode('==',$b); var_dump($x,$y,$m,$n); var_dump($x +0 == $y + 0); var_dump($m +0 == $n + 0); preg_match_all("[0-9]*==[0-9]*",$condition_string,$matches); var_dump($matches);
based on hMFCZ
Output for 5.2.0 - 7.3.1
Notice: Undefined variable: parts in /in/eDGvn on line 3 NULL NULL NULL string(1) "1" string(1) "1" bool(true) bool(true) Warning: preg_match_all(): Unknown modifier '*' in /in/eDGvn on line 11 NULL
Output for 5.0.4 - 5.1.6
Notice: Undefined variable: parts in /in/eDGvn on line 3 NULL NULL NULL string(1) "1" string(1) "1" bool(true) bool(true) Warning: preg_match_all(): Unknown modifier '*' in /in/eDGvn on line 11 array(0) { }
Output for 4.3.11 - 5.0.3
Notice: Undefined variable: parts in /in/eDGvn on line 3 NULL NULL NULL string(1) "1" string(1) "1" bool(true) bool(true) Warning: preg_match_all(): Unknown modifier '*' in /in/eDGvn on line 11 array(0) { }
Output for 4.3.0 - 4.3.10
Notice: Undefined variable: parts in /in/eDGvn on line 3 NULL NULL NULL string(1) "1" string(1) "1" bool(true) bool(true) Warning: Unknown modifier '*' in /in/eDGvn on line 11 array(0) { }