3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Out extends Exception { private $value; function __construct($value) { $this->value = $value; } function getValue() { return $this->value; } } function out($value) { throw new Out($value); } function mul($x, $y) { try { return ($x ?? out(NULL)) * ($y ?? out(NULL)); } catch (Out $out) { return $out->getValue(); } } var_export(mul(3, 4)); print "\n"; var_export(mul(3, NULL)); print "\n"; var_export(mul(NULL, 4)); print "\n";

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.60.0180.00318.68
8.3.50.0110.00418.18
8.3.40.0110.00418.59
8.3.30.0090.00619.02
8.3.20.0070.00023.48
8.3.10.0080.00021.89
8.3.00.0050.00320.68
8.2.180.0120.00918.06
8.2.170.0070.00722.96
8.2.160.0080.00520.22
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0070.00322.20
8.2.100.0110.00017.97
8.2.90.0080.00017.63
8.2.80.0000.00918.78
8.2.70.0040.00417.75
8.2.60.0040.00417.80
8.2.50.0060.00318.07
8.2.40.0040.00418.16
8.2.30.0040.00718.11
8.2.20.0020.00518.12
8.2.10.0000.00820.94
8.2.00.0080.00019.25
8.1.280.0070.01025.92
8.1.270.0090.00022.14
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00619.21
8.1.230.0090.00317.83
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.47
8.1.190.0050.00317.35
8.1.180.0030.00518.10
8.1.170.0080.00018.64
8.1.160.0060.00318.89
8.1.150.0050.00218.95
8.1.140.0040.00420.70
8.1.130.0030.00320.09
8.1.120.0030.00317.37
8.1.110.0040.00417.48
8.1.100.0050.00217.46
8.1.90.0000.00717.43
8.1.80.0030.00517.52
8.1.70.0040.00417.34
8.1.60.0000.00917.60
8.1.50.0030.00617.54
8.1.40.0060.00317.43
8.1.30.0060.00317.68
8.1.20.0090.00017.69
8.1.10.0030.00617.64
8.1.00.0000.00817.52
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0050.00318.40
8.0.270.0050.00217.24
8.0.260.0000.00619.98
8.0.250.0030.00316.89
8.0.240.0000.00816.89
8.0.230.0000.00616.94
8.0.220.0040.00416.94
8.0.210.0030.00316.93
8.0.200.0070.00016.99
8.0.190.0080.00316.92
8.0.180.0050.00316.95
8.0.170.0030.00616.87
8.0.160.0040.00416.81
8.0.150.0040.00316.78
8.0.140.0050.00316.77
8.0.130.0000.00613.40
8.0.120.0000.00816.87
8.0.110.0000.00816.82
8.0.100.0000.00716.77
8.0.90.0040.00417.02
8.0.80.0030.01216.96
8.0.70.0000.00816.84
8.0.60.0050.00316.91
8.0.50.0000.00916.77
8.0.30.0170.01117.38
8.0.20.0110.00816.97
8.0.10.0000.00717.17
8.0.00.0100.00716.73
7.4.330.0000.00515.55
7.4.320.0000.00716.61
7.4.300.0060.00016.57
7.4.290.0000.00816.41
7.4.280.0040.00416.44
7.4.270.0000.00716.66
7.4.260.0000.00613.27
7.4.250.0030.00316.54
7.4.240.0040.00316.60
7.4.230.0050.00316.59
7.4.220.0040.00416.58
7.4.210.0050.01216.59
7.4.200.0040.00416.41
7.4.130.0120.00416.57
7.4.120.0160.00416.43
7.4.110.0120.00616.69
7.4.100.0110.00716.59
7.4.90.0070.01416.50
7.4.80.0120.00619.39
7.4.70.0150.00416.55
7.4.60.0090.00916.51
7.4.50.0040.01216.45
7.4.40.0200.00316.54
7.4.10.0070.01015.09
7.4.00.0060.01114.91
7.3.330.0060.00016.40
7.3.320.0000.00713.44
7.3.310.0030.00316.21
7.3.300.0000.00716.36
7.3.290.0030.00316.23
7.3.280.0090.00616.34
7.3.260.0090.00916.37
7.3.240.0080.00916.51
7.3.230.0140.00316.57
7.3.210.0030.01416.33
7.3.200.0100.00716.45
7.3.190.0100.00716.42
7.3.180.0100.00716.56
7.3.170.0060.01416.29
7.3.160.0070.01016.60
7.3.130.0110.00514.94
7.3.120.0060.01114.82
7.3.110.0090.00814.67
7.3.100.0070.00814.86
7.3.90.0070.00914.73
7.3.80.0050.00914.76
7.3.70.0070.00714.81
7.3.60.0070.00814.80
7.3.50.0070.00714.68
7.3.40.0060.00714.75
7.3.30.0050.00714.76
7.3.20.0060.00716.28
7.3.10.0040.01016.31
7.3.00.0070.00716.29
7.2.330.0030.01316.45
7.2.320.0180.00616.75
7.2.310.0100.00716.61
7.2.300.0100.01316.46
7.2.290.0030.01316.87
7.2.260.0070.01014.95
7.2.250.0050.01115.18
7.2.240.0070.01014.97
7.2.230.0060.01114.94
7.2.220.0050.00915.13
7.2.210.0070.01014.88
7.2.200.0080.00815.09
7.2.190.0060.00814.92
7.2.180.0060.00715.03
7.2.170.0070.01014.99
7.2.160.0040.00814.97
7.2.150.0080.00916.30
7.2.140.0070.00916.28
7.2.130.0070.00916.31
7.2.120.0100.00616.27
7.2.110.0030.01216.29
7.2.100.0090.00816.22
7.2.90.0070.00816.37
7.2.80.0020.01216.36
7.2.70.0090.00916.21
7.2.60.0080.01016.25
7.2.50.0060.01016.38
7.2.40.0050.01016.43
7.2.30.0070.01016.40
7.2.20.0050.01016.34
7.2.10.0070.00716.35
7.2.00.0040.00916.25
7.1.330.0030.01015.69
7.1.320.0040.00915.50
7.1.310.0070.00715.42
7.1.300.0050.00815.24
7.1.290.0070.00615.41
7.1.280.0040.01115.32
7.1.270.0060.00615.30
7.1.260.0080.00815.56
7.1.250.0070.00715.18
7.1.240.0020.00815.64
7.1.230.0030.01015.85
7.1.220.0050.01215.75
7.1.210.0030.01015.80
7.1.200.0000.00915.79
7.1.190.0030.00815.79
7.1.180.0040.00715.76
7.1.170.0060.00715.75
7.1.160.0070.00815.74
7.1.150.0090.00415.84
7.1.140.0050.00515.76
7.1.130.0040.00615.77
7.1.120.0070.00415.65
7.1.110.0070.00915.67
7.1.100.0030.01215.75
7.1.90.0080.00315.70
7.1.80.0070.00715.61
7.1.70.0100.00415.75
7.1.60.0080.00715.78
7.1.50.0060.00615.97
7.1.40.0090.00215.75
7.1.30.0060.00615.83
7.1.20.0090.00515.57
7.1.10.0050.00815.70
7.1.00.0070.00615.69

preferences:
63.83 ms | 401 KiB | 5 Q