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() { throw new Out(); } 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.70.0140.00716.50
8.3.60.0150.00318.55
8.3.50.0070.01018.09
8.3.40.0000.01418.97
8.3.30.0070.00718.65
8.3.20.0050.00323.65
8.3.10.0040.00421.98
8.3.00.0050.00320.79
8.2.190.0040.01116.58
8.2.180.0030.01618.54
8.2.170.0140.00022.96
8.2.160.0070.00720.47
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00026.16
8.2.110.0090.00022.13
8.2.100.0060.00617.91
8.2.90.0030.00620.47
8.2.80.0060.00317.97
8.2.70.0080.00018.04
8.2.60.0080.00018.09
8.2.50.0060.00318.10
8.2.40.0070.00019.33
8.2.30.0000.00719.12
8.2.20.0070.00018.16
8.2.10.0000.00719.18
8.2.00.0000.00719.24
8.1.280.0150.00425.92
8.1.270.0040.00422.25
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0030.00622.42
8.1.230.0040.00820.85
8.1.220.0000.00917.74
8.1.210.0000.00918.77
8.1.200.0080.00017.35
8.1.190.0060.00317.35
8.1.180.0030.00518.10
8.1.170.0040.00420.83
8.1.160.0050.00218.92
8.1.150.0040.00418.79
8.1.140.0000.00720.83
8.1.130.0070.00021.75
8.1.120.0030.00517.41
8.1.110.0040.00417.37
8.1.100.0000.00717.42
8.1.90.0030.00517.41
8.1.80.0000.00717.47
8.1.70.0040.00417.27
8.1.60.0060.00317.59
8.1.50.0040.00417.61
8.1.40.0050.00317.58
8.1.30.0000.00817.55
8.1.20.0050.00317.59
8.1.10.0080.00017.62
8.1.00.0040.00417.50
8.0.300.0060.00319.98
8.0.290.0040.00416.75
8.0.280.0040.00418.46
8.0.270.0070.00017.20
8.0.260.0080.00020.09
8.0.250.0040.00417.08
8.0.240.0030.00317.09
8.0.230.0030.00316.93
8.0.220.0040.00316.92
8.0.210.0030.00316.94
8.0.200.0000.00817.04
8.0.190.0060.00317.00
8.0.180.0050.00316.91
8.0.170.0080.00016.92
8.0.160.0090.00016.79
8.0.150.0070.00016.92
8.0.140.0040.00416.75
8.0.130.0060.00013.42
8.0.120.0000.00716.75
8.0.110.0050.00216.93
8.0.100.0080.00016.75
8.0.90.0040.00416.79
8.0.80.0100.01016.96
8.0.70.0030.00516.74
8.0.60.0040.00416.79
8.0.50.0070.00316.79
8.0.30.0120.00816.96
8.0.20.0080.01117.02
8.0.10.0030.00516.98
8.0.00.0060.01216.78
7.4.330.0000.00615.55
7.4.320.0080.00016.54
7.4.300.0030.00316.51
7.4.290.0000.00716.58
7.4.280.0030.00616.63
7.4.270.0030.00316.64
7.4.260.0000.00513.25
7.4.250.0040.00416.53
7.4.240.0050.00216.60
7.4.230.0040.00416.26
7.4.220.0040.00416.68
7.4.210.0080.00716.61
7.4.200.0050.00216.41
7.4.130.0080.00816.42
7.4.120.0120.00916.42
7.4.110.0080.00816.67
7.4.100.0060.01116.50
7.4.90.0070.01116.71
7.4.80.0090.00919.39
7.4.70.0100.00616.25
7.4.60.0060.01216.39
7.4.50.0060.01216.31
7.4.40.0040.02016.49
7.4.00.0050.01214.93
7.3.330.0030.00316.25
7.3.320.0000.00813.36
7.3.310.0050.00216.37
7.3.300.0070.00016.39
7.3.290.0000.00716.24
7.3.280.0100.00716.35
7.3.260.0100.00716.56
7.3.240.0080.01016.44
7.3.230.0080.00816.50
7.3.210.0120.00416.29
7.3.200.0130.00316.39
7.3.190.0090.00616.33
7.3.180.0110.01716.43
7.3.170.0060.01516.30
7.3.160.0090.01216.65
7.3.120.0040.01514.73
7.3.110.0070.00715.05
7.3.100.0060.01114.91
7.3.90.0070.00914.81
7.3.80.0100.00614.87
7.3.70.0100.00514.87
7.3.60.0130.00514.85
7.3.50.0100.00814.83
7.3.40.0090.00514.57
7.3.30.0090.00814.73
7.3.20.0100.00515.77
7.3.10.0080.00815.68
7.3.00.0080.00915.69
7.2.330.0120.00616.65
7.2.320.0070.01016.66
7.2.310.0030.01416.70
7.2.300.0040.01516.61
7.2.290.0080.01316.73
7.2.250.0130.00715.07
7.2.240.0080.01115.09
7.2.230.0080.01214.64
7.2.220.0090.00715.10
7.2.210.0090.00914.75
7.2.200.0080.00915.04
7.2.190.0060.01214.89
7.2.180.0100.00715.02
7.2.170.0090.00615.06
7.2.160.0020.01215.01
7.2.150.0080.01115.81
7.2.140.0120.00216.06
7.2.130.0050.01215.88
7.2.120.0030.01515.98
7.2.110.0130.00615.85
7.2.100.0110.00715.95
7.2.90.0060.01116.07
7.2.80.0060.01016.00
7.2.70.0020.01615.86
7.2.60.0100.00615.90
7.2.50.0100.00716.00
7.2.40.0060.01216.06
7.2.30.0130.00515.88
7.2.20.0090.00915.95
7.2.10.0060.01015.77
7.2.00.0080.00915.85
7.1.330.0040.01115.56
7.1.320.0060.01014.78
7.1.310.0100.00414.93
7.1.300.0070.00914.87
7.1.290.0080.00914.68
7.1.280.0110.00514.61
7.1.270.0100.00614.81
7.1.260.0100.00714.80
7.1.250.0100.00714.80
7.1.240.0100.00315.59
7.1.230.0000.00815.85
7.1.220.0060.00915.66
7.1.210.0040.00815.65
7.1.200.0070.00715.84
7.1.190.0000.01415.79
7.1.180.0000.00815.62
7.1.170.0030.01015.61
7.1.160.0110.00415.36
7.1.150.0110.00615.75
7.1.140.0030.00715.78
7.1.130.0030.00615.83
7.1.120.0070.00315.68
7.1.110.0060.00615.43
7.1.100.0110.00315.87
7.1.90.0120.00315.79
7.1.80.0070.01015.64
7.1.70.0130.00315.56
7.1.60.0070.00715.87
7.1.50.0000.01215.82
7.1.40.0000.01215.71
7.1.30.0030.01215.78
7.1.20.0090.00015.79
7.1.10.0030.01315.70
7.1.00.0040.00815.84

preferences:
68.12 ms | 401 KiB | 5 Q