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.4.20.0100.01019.80
8.4.10.0060.00319.63
8.3.150.0070.01117.02
8.3.140.0060.00317.14
8.3.130.0160.00916.76
8.3.120.0260.00717.11
8.3.110.0280.00916.56
8.3.100.0330.00716.51
8.3.90.0330.00716.47
8.3.80.0330.00716.42
8.3.70.0320.00716.48
8.3.60.0320.00716.42
8.3.50.0320.00616.46
8.3.40.0270.00617.47
8.3.30.0270.00717.41
8.3.20.0270.00817.42
8.3.10.0250.00617.44
8.3.00.0180.00617.92
8.2.260.0000.01417.41
8.2.250.0140.01217.50
8.2.240.0270.00716.55
8.2.230.0270.00716.53
8.2.220.0240.00816.58
8.2.210.0250.00816.54
8.2.200.0270.00716.55
8.2.190.0270.00716.57
8.2.180.0260.00716.59
8.2.170.0280.01017.69
8.2.160.0300.00717.64
8.2.150.0290.00817.51
8.2.140.0310.00717.44
8.2.130.0290.00817.43
8.2.120.0300.00717.49
8.2.110.0300.00717.53
8.2.100.0290.00717.49
8.2.90.0290.00717.53
8.2.80.0300.00817.50
8.2.70.0290.00917.48
8.2.60.0310.00717.43
8.2.50.0300.00717.40
8.2.40.0290.00717.51
8.2.30.0280.00817.38
8.2.20.0280.00617.38
8.2.10.0280.00717.26
8.2.00.0310.00617.35
8.1.310.0040.00418.55
8.1.300.0270.01016.19
8.1.290.0270.01016.16
8.1.280.0280.00816.16
8.1.270.0300.00917.18
8.1.260.0310.00617.22
8.1.250.0290.00817.25
8.1.240.0260.00817.28
8.1.230.0250.01017.28
8.1.220.0280.00717.18
8.1.210.0260.00817.17
8.1.200.0270.00817.08
8.1.190.0270.00817.11
8.1.180.0270.00817.09
8.1.170.0250.01017.10
8.1.160.0290.00717.08
8.1.150.0280.00717.08
8.1.140.0280.00817.00
8.1.130.0270.00717.06
8.1.120.0260.00717.15
8.1.110.0250.00817.07
8.1.100.0270.00717.09
8.1.90.0290.00817.08
8.1.80.0280.00717.04
8.1.70.0260.00817.08
8.1.60.0280.00817.30
8.1.50.0300.00717.25
8.1.40.0280.00717.28
8.1.30.0300.00817.37
8.1.20.0310.00717.44
8.1.10.0320.00817.31
8.1.00.0310.00817.16
8.0.300.0340.00616.27
8.0.290.0260.01016.73
8.0.280.0300.00616.49
8.0.270.0260.01016.63
8.0.260.0270.00916.65
8.0.250.0400.01116.43
8.0.240.0370.00616.43
8.0.230.0180.01116.57
8.0.220.0180.01116.57
8.0.210.0250.00616.30
8.0.200.0320.00316.51
8.0.190.0280.00816.54
8.0.180.0280.00716.65
8.0.170.0220.00716.54
8.0.160.0120.01616.79
8.0.150.0260.00316.55
8.0.140.0300.00016.52
8.0.130.0330.00916.49
8.0.120.0220.01316.50
8.0.110.0290.00716.32
8.0.100.0290.00616.42
8.0.90.0280.00716.51
8.0.80.0310.00316.61
8.0.70.0310.00416.63
8.0.60.0310.00416.56
8.0.50.0310.00316.66
8.0.30.0310.00316.66
8.0.20.0230.01016.61
8.0.10.0160.01216.57
8.0.00.0090.01816.66
7.4.330.0190.01116.18
7.4.320.0260.00316.25
7.4.300.0220.00616.31
7.4.290.0260.00716.37
7.4.280.0290.00716.28
7.4.270.0290.01016.29
7.4.260.0310.00616.18
7.4.250.0250.00616.18
7.4.240.0210.01016.18
7.4.230.0240.00916.18
7.4.220.0260.00716.18
7.4.210.0190.01316.23
7.4.200.0280.00416.26
7.4.190.0180.01416.18
7.4.180.0240.00816.46
7.4.160.0240.00716.20
7.4.150.0250.00716.19
7.4.140.0340.00316.18
7.4.130.0290.00716.19
7.4.120.0280.00416.18
7.4.110.0220.01016.18
7.4.100.0210.01116.24
7.4.90.0250.00716.18
7.4.80.0220.00916.18
7.4.70.0320.00016.25
7.4.60.0190.01316.31
7.4.50.0320.00016.18
7.4.40.0220.00916.18
7.4.30.0320.00316.18
7.4.20.0310.00016.18
7.4.10.0180.01316.18
7.4.00.0280.00316.24
7.3.330.0280.00416.18
7.3.320.0280.00416.18
7.3.310.0320.00016.18
7.3.300.0210.01116.32
7.3.290.0250.00716.20
7.3.280.0360.00316.18
7.3.270.0320.00416.18
7.3.260.0320.00016.18
7.3.250.0230.00916.18
7.3.240.0290.00316.33
7.3.230.0250.00716.18
7.3.220.0150.01816.18
7.3.210.0180.01516.18
7.3.200.0330.00016.18
7.3.190.0300.00616.18
7.3.180.0180.00916.18
7.3.170.0240.00316.18
7.3.160.0240.00316.18
7.3.150.0140.01416.18
7.3.140.0240.01216.18
7.3.130.0310.00316.18
7.3.120.0260.00616.18
7.3.110.0270.00416.18
7.3.100.0190.01316.18
7.3.90.0260.00616.18
7.3.80.0320.00016.18
7.3.70.0250.00716.18
7.3.60.0120.02016.18
7.3.50.0320.00016.46
7.3.40.0280.00416.18
7.3.30.0320.00016.18
7.3.20.0350.00017.73
7.3.10.0190.01217.84
7.3.00.0250.00817.80
7.2.340.0190.01616.18
7.2.330.0230.01016.18
7.2.320.0250.00616.18
7.2.310.0220.00716.18
7.2.300.0320.00416.18
7.2.290.0270.00716.18
7.2.280.0280.00416.18
7.2.270.0280.00416.18
7.2.260.0230.00916.18
7.2.250.0220.01016.27
7.2.240.0230.00916.18
7.2.230.0320.00016.18
7.2.220.0230.00916.18
7.2.210.0210.01116.18
7.2.200.0250.00716.27
7.2.190.0270.00516.18
7.2.180.0200.01216.28
7.2.170.0260.00716.19
7.2.160.0380.00616.18
7.2.150.0300.00518.11
7.2.140.0280.00518.25
7.2.130.0270.00718.10
7.2.120.0220.01018.15
7.2.110.0280.00417.98
7.2.100.0270.00718.19
7.2.90.0250.00718.03
7.2.80.0290.00618.32
7.2.70.0280.00617.98
7.2.60.0290.00018.22
7.2.50.0230.00318.33
7.2.40.0220.00617.89
7.2.30.0290.00417.95
7.2.20.0280.00818.04
7.2.10.0280.00617.93
7.2.00.0290.00318.24
7.1.330.0250.00317.10
7.1.320.0230.00816.95
7.1.310.0240.00417.12
7.1.300.0250.00416.80
7.1.290.0260.00316.88
7.1.280.0200.00816.70
7.1.270.0230.00616.94
7.1.260.0220.00617.07
7.1.250.0230.00816.52
7.1.240.0180.00916.77
7.1.230.0280.00016.79
7.1.220.0260.00316.98
7.1.210.0230.00616.74
7.1.200.0230.00617.17
7.1.190.0110.00316.97
7.1.180.0090.00416.90
7.1.170.0090.00416.92
7.1.160.0130.00016.64
7.1.150.0030.01017.10
7.1.140.0160.00016.90
7.1.130.0170.00316.98
7.1.120.0070.00716.91
7.1.110.0110.00717.13
7.1.100.0120.01717.11
7.1.90.0290.00416.79
7.1.80.0220.01616.57
7.1.70.0240.00716.48
7.1.60.0290.00017.08
7.1.50.0160.01016.94
7.1.40.0230.00716.83
7.1.30.0240.00816.93
7.1.20.0240.00016.87
7.1.10.0150.01016.60
7.1.00.0170.01116.82
7.0.330.0230.00716.45
7.0.320.0180.01116.59
7.0.310.0250.00416.52
7.0.300.0290.00016.68
7.0.290.0160.01216.53
7.0.280.0210.00916.60
7.0.270.0190.00616.68
7.0.260.0180.00916.52
7.0.250.0250.00416.66
7.0.240.0240.00416.60
7.0.230.0320.00016.75
7.0.220.0260.00316.46
7.0.210.0300.00416.66
7.0.200.0220.00616.61
7.0.190.0250.00616.96
7.0.180.0210.00716.70
7.0.170.0190.00916.83
7.0.160.0160.01216.79
7.0.150.0210.00916.70
7.0.140.0190.01216.73
7.0.130.0170.00916.61
7.0.120.0170.00816.59
7.0.110.0090.01516.84
7.0.100.0200.01016.71
7.0.90.0260.00016.55
7.0.80.0210.00316.64
7.0.70.0140.01016.35
7.0.60.0240.00316.50
7.0.50.0200.01016.34
7.0.40.0280.00016.40
7.0.30.0250.00316.61
7.0.20.0280.00016.54
7.0.10.0200.00816.70
7.0.00.0190.00916.58
5.6.400.0180.00716.09
5.6.390.0210.00816.18
5.6.380.0210.00816.18
5.6.370.0210.00716.18
5.6.360.0310.00016.18
5.6.350.0230.00516.18
5.6.340.0210.01116.18
5.6.330.0190.01016.18
5.6.320.0360.00716.18
5.6.310.0180.01016.18
5.6.300.0200.00316.18
5.6.290.0200.00916.18
5.6.280.0210.00716.18
5.6.270.0220.00716.18
5.6.260.0180.01116.18
5.6.250.0250.00416.18
5.6.240.0250.00416.18
5.6.230.0220.00616.18
5.6.220.0250.00416.18
5.6.210.0220.00716.18
5.6.200.0260.00316.18
5.6.190.0240.00616.18
5.6.180.0300.00316.18
5.6.170.0140.00916.18
5.6.160.0200.00316.18
5.6.150.0200.00316.18
5.6.140.0230.00616.18
5.6.130.0260.00316.18
5.6.120.0260.00316.18
5.6.110.0290.00016.18
5.6.100.0110.01816.18
5.6.90.0260.00416.18
5.6.80.0270.00416.18
5.6.70.0230.00016.18
5.6.60.0130.00016.18
5.6.50.0060.00616.18
5.6.40.0130.00016.18
5.6.30.0130.00016.18
5.6.20.0130.00016.18
5.6.10.0140.00016.18
5.6.00.0190.00816.18
5.5.380.0210.00716.18
5.5.370.0190.00916.18
5.5.360.0190.01016.18
5.5.350.0140.01416.18
5.5.340.0260.00316.18
5.5.330.0250.00416.18
5.5.320.0280.00016.18
5.5.310.0180.01116.18
5.5.300.0240.00416.18
5.5.290.0240.00616.18
5.5.280.0210.00716.18
5.5.270.0210.00716.18
5.5.260.0250.00316.18
5.5.250.0240.00416.18
5.5.240.0250.00316.18
5.5.230.0190.00816.18
5.5.220.0130.01616.18
5.5.210.0200.01016.18
5.5.200.0270.00016.18
5.5.190.0270.00016.18
5.5.180.0230.00416.18
5.5.170.0240.00416.18
5.5.160.0250.00316.18
5.5.150.0190.01516.18
5.5.140.0310.00516.18
5.5.130.0230.00416.18
5.5.120.0190.00816.18
5.5.110.0250.00316.18
5.5.100.0190.00816.18
5.5.90.0110.01116.18
5.5.80.0130.01016.18
5.5.70.0160.01116.18
5.5.60.0170.01016.18
5.5.50.0210.00716.18
5.5.40.0240.00816.18
5.5.30.0230.00616.18
5.5.20.0150.00916.18
5.5.10.0150.01216.18
5.5.00.0190.00516.18
5.4.450.0160.00316.18
5.4.440.0190.00416.18
5.4.430.0260.00816.18
5.4.420.0090.00916.18
5.4.410.0180.00016.18
5.4.400.0150.00316.18
5.4.390.0180.00016.18
5.4.380.0190.00016.18
5.4.370.0180.00016.18
5.4.360.0180.00016.18
5.4.350.0190.00316.18
5.4.340.0190.00316.18
5.4.330.0180.00016.18
5.4.320.0130.00916.18
5.4.310.0170.00416.18
5.4.300.0150.00716.18
5.4.290.0160.00616.18
5.4.280.0130.00416.18
5.4.270.0120.00616.18
5.4.260.0120.00616.18
5.4.250.0130.00916.18
5.4.240.0190.00316.18
5.4.230.0110.00716.18
5.4.220.0090.00916.18
5.4.210.0140.00716.18
5.4.200.0140.00416.18
5.4.190.0190.00416.18
5.4.180.0190.00316.18
5.4.170.0220.00016.18
5.4.160.0230.00016.18
5.4.150.0180.00416.18
5.4.140.0180.00416.18
5.4.130.0130.00416.18
5.4.120.0060.01416.18
5.4.110.0180.00316.18
5.4.100.0120.00616.18
5.4.90.0200.00016.18
5.4.80.0160.00416.18
5.4.70.0130.00416.18
5.4.60.0140.00316.18
5.4.50.0140.00316.18
5.4.40.0140.00316.18
5.4.30.0140.00716.18
5.4.20.0180.00016.18
5.4.10.0130.00416.18
5.4.00.0140.00316.18
5.3.290.0110.01116.18
5.3.280.0160.00616.18
5.3.270.0110.01116.18
5.3.260.0180.00416.18
5.3.250.0190.00316.18
5.3.240.0110.01116.18
5.3.230.0250.00616.18
5.3.220.0190.00316.18
5.3.210.0150.00416.18
5.3.200.0180.00016.18
5.3.190.0190.00316.18
5.3.180.0140.00716.18
5.3.170.0090.01316.18
5.3.160.0180.00016.18
5.3.150.0140.00416.18
5.3.140.0130.00816.18
5.3.130.0190.00316.18
5.3.120.0190.00316.18
5.3.110.0170.00616.18
5.3.100.0200.00416.18
5.3.90.0180.00416.18
5.3.80.0190.00416.18
5.3.70.0210.00416.18
5.3.60.0160.00616.18
5.3.50.0100.00716.18
5.3.40.0100.00716.18
5.3.30.0170.00316.18
5.3.20.0120.00616.18
5.3.10.0160.00416.18
5.3.00.0130.00816.18
5.2.170.0110.00716.18
5.2.160.0110.00816.18
5.2.150.0070.01016.18
5.2.140.0040.01316.18
5.2.130.0130.00416.18
5.2.120.0140.00316.18
5.2.110.0130.00516.18
5.2.100.0130.00916.18
5.2.90.0140.00516.18
5.2.80.0110.00716.18
5.2.70.0150.00316.18
5.2.60.0120.00616.18
5.2.50.0110.00716.18
5.2.40.0140.00316.18
5.2.30.0130.00516.18
5.2.20.0110.00616.18
5.2.10.0130.00416.18
5.2.00.0140.00316.18
5.1.60.0120.00416.18
5.1.50.0120.00416.18
5.1.40.0160.00016.18
5.1.30.0080.00816.18
5.1.20.0120.00416.18
5.1.10.0160.00016.18
5.1.00.0130.00316.18
5.0.50.0100.00316.18
5.0.40.0100.00316.18
5.0.30.0100.00316.18
5.0.20.0060.00916.18
5.0.10.0110.00416.18
5.0.00.0070.00716.18
4.4.90.0060.00016.18
4.4.80.0080.00016.18
4.4.70.0050.00316.18
4.4.60.0080.00016.18
4.4.50.0080.00016.18
4.4.40.0080.00016.18
4.4.30.0070.00016.18
4.4.20.0050.00316.18
4.4.10.0080.00016.18
4.4.00.0080.00016.18
4.3.110.0070.00016.18
4.3.100.0080.00016.18
4.3.90.0030.00516.18
4.3.80.0080.00016.18
4.3.70.0060.00216.18
4.3.60.0070.00016.18
4.3.50.0000.00816.18
4.3.40.0070.00016.18
4.3.30.0000.00616.18
4.3.20.0060.00016.18
4.3.10.0060.00016.18
4.3.00.0060.00016.18

preferences:
27.08 ms | 403 KiB | 5 Q