3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = false; if($false > 0){ echo ">0 does not filter false"; } if($false >= 0){ echo ">=0 does not filter false"; } if($false < 0){ echo "<0 does not filter false"; } if($false <= 0){ echo "<=0 does not filter false"; } if($false > 1){ echo ">1 does not filter false"; } if($false >= 1){ echo ">=1 does not filter false"; } if($false < 1){ echo "<1 does not filter false"; } if($false <= 1){ echo "<=1 does not filter false"; } if($false > -1){ echo ">-1 does not filter false"; } if($false >= -1){ echo ">=-1 does not filter false"; } if($false < -1){ echo "<-1 does not filter false"; } if($false <= -1){ echo "<=-1 does not filter false"; }
Output for 8.0.1 - 8.0.26, 8.1.0 - 8.1.13, 8.2rc1 - rc3
Warning: Undefined variable $false in /in/NoaOE on line 5 Warning: Undefined variable $false in /in/NoaOE on line 9 >=0 does not filter false Warning: Undefined variable $false in /in/NoaOE on line 13 Warning: Undefined variable $false in /in/NoaOE on line 17 <=0 does not filter false Warning: Undefined variable $false in /in/NoaOE on line 21 Warning: Undefined variable $false in /in/NoaOE on line 25 Warning: Undefined variable $false in /in/NoaOE on line 29 <1 does not filter false Warning: Undefined variable $false in /in/NoaOE on line 33 <=1 does not filter false Warning: Undefined variable $false in /in/NoaOE on line 37 Warning: Undefined variable $false in /in/NoaOE on line 41 Warning: Undefined variable $false in /in/NoaOE on line 45 <-1 does not filter false Warning: Undefined variable $false in /in/NoaOE on line 49 <=-1 does not filter false
Output for 7.4.0 - 7.4.33
Notice: Undefined variable: false in /in/NoaOE on line 5 Notice: Undefined variable: false in /in/NoaOE on line 9 >=0 does not filter false Notice: Undefined variable: false in /in/NoaOE on line 13 Notice: Undefined variable: false in /in/NoaOE on line 17 <=0 does not filter false Notice: Undefined variable: false in /in/NoaOE on line 21 Notice: Undefined variable: false in /in/NoaOE on line 25 Notice: Undefined variable: false in /in/NoaOE on line 29 <1 does not filter false Notice: Undefined variable: false in /in/NoaOE on line 33 <=1 does not filter false Notice: Undefined variable: false in /in/NoaOE on line 37 Notice: Undefined variable: false in /in/NoaOE on line 41 Notice: Undefined variable: false in /in/NoaOE on line 45 <-1 does not filter false Notice: Undefined variable: false in /in/NoaOE on line 49 <=-1 does not filter false

preferences:
22.1 ms | 413 KiB | 5 Q