3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); // print() ignores strict_types... print(1 + 2) * 3; // outputs "9"; the parentheses cause 1+2 to be evaluated first, then 3*3 // the print statement sees the whole expression as one argument // As for the type mismatch? the strict_types ? ignored.. echo "\n"; if ( print("hello") && false ) { print "WTF: inside if"; } else { print "OK: inside else"; } echo "\n"; if ( 1 && false ) { print "WTF: inside if"; } else { print "OK: inside else"; } echo "\n"; print "hello " && print "world"; // outputs "world1"; ... WTF? echo "\n"; ob_start(); print "hello " && print "world"; $str = ob_get_clean(); assert(str_contains($str, 'hello'));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.130.0030.00616.97
8.3.120.0260.00817.12
8.3.110.0280.00916.57
8.3.100.0330.00716.50
8.3.90.0330.00716.46
8.3.80.0320.00716.42
8.3.70.0320.00716.47
8.3.60.0310.00716.41
8.3.50.0320.00616.46
8.3.40.0270.00617.48
8.3.30.0270.00717.40
8.3.20.0270.00817.44
8.3.10.0250.00617.43
8.3.00.0180.00617.94
8.2.250.0040.01118.48
8.2.240.0270.00716.56
8.2.230.0260.00716.52
8.2.220.0230.00816.58
8.2.210.0250.00716.52
8.2.200.0270.00716.55
8.2.190.0270.00716.57
8.2.180.0260.00716.60
8.2.170.0270.01117.69
8.2.160.0300.00717.63
8.2.150.0290.00817.51
8.2.140.0310.00717.44
8.2.130.0290.00817.44
8.2.120.0300.00717.49
8.2.110.0300.00717.54
8.2.100.0290.00617.49
8.2.90.0290.00717.54
8.2.80.0290.00817.49
8.2.70.0290.00917.48
8.2.60.0310.00717.43
8.2.50.0300.00717.40
8.2.40.0300.00717.52
8.2.30.0280.00817.37
8.2.20.0280.00617.38
8.2.10.0270.00817.28
8.2.00.0310.00617.35
8.1.300.0270.01016.19
8.1.290.0270.00916.15
8.1.280.0280.00816.15
8.1.270.0300.00917.19
8.1.260.0320.00717.20
8.1.250.0290.00817.25
8.1.240.0260.00817.27
8.1.230.0240.01017.28
8.1.220.0280.00717.18
8.1.210.0260.00817.17
8.1.200.0280.00817.07
8.1.190.0270.00817.11
8.1.180.0270.00917.09
8.1.170.0250.01017.10
8.1.160.0290.00717.08
8.1.150.0280.00717.07
8.1.140.0280.00717.00
8.1.130.0270.00617.06
8.1.120.0260.00717.15
8.1.110.0240.00817.08
8.1.100.0270.00717.09
8.1.90.0290.00817.07
8.1.80.0280.00717.04
8.1.70.0260.00817.08
8.1.60.0280.00717.30
8.1.50.0300.00717.26
8.1.40.0280.00717.28
8.1.30.0300.00817.38
8.1.20.0300.00717.43
8.1.10.0320.00817.31
8.1.00.0310.00817.15
5.6.400.0170.00716.05

preferences:
33.56 ms | 403 KiB | 5 Q