3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function (int $serverity, string $message, string $filename, int $line) { echo "throwing\n"; throw new ErrorException($message, 0, $serverity, $filename, $line); }); $stdObject = new stdClass(); //Can't be casted to string //array_diff compares array items CASTING them to string //http://php.net/manual/en/function.array-diff.php try { array_diff([], [$stdObject]); }catch(ErrorException $ee){ echo "Catched exception: " . $ee->getMessage() . "\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.0110.01118.55
8.3.50.0170.00016.32
8.3.40.0070.01118.45
8.3.30.0090.00618.55
8.3.20.0050.00321.94
8.3.10.0040.00423.71
8.3.00.0090.00017.78
8.2.180.0100.01018.14
8.2.170.0150.00322.96
8.2.160.0070.00721.19
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00420.38
8.2.120.0040.00426.35
8.2.110.0060.00322.20
8.2.100.0120.00017.91
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0040.00417.48
8.2.60.0040.00418.04
8.2.50.0040.00419.13
8.2.40.0000.00720.45
8.2.30.0000.00719.08
8.2.20.0070.00017.96
8.2.10.0000.00718.07
8.2.00.0040.00417.94
8.1.280.0040.01125.92
8.1.270.0070.00022.05
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00520.96
8.1.230.0120.00019.02
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0050.00517.22
8.1.190.0030.00617.43
8.1.180.0080.00018.10
8.1.170.0040.00418.66
8.1.160.0000.00818.95
8.1.150.0020.00520.14
8.1.140.0030.00519.65
8.1.130.0040.00418.89
8.1.120.0000.00717.38
8.1.110.0040.00417.36
8.1.100.0000.00817.45
8.1.90.0000.00717.46
8.1.80.0000.00817.44
8.1.70.0070.00017.46
8.1.60.0060.00317.60
8.1.50.0060.00317.54
8.1.40.0030.00517.40
8.1.30.0000.00717.62
8.1.20.0030.00517.63
8.1.10.0070.00017.62
8.1.00.0000.00817.55
8.0.300.0070.00020.12
8.0.290.0070.00016.63
8.0.280.0070.00018.42
8.0.270.0070.00017.25
8.0.260.0030.00316.92
8.0.250.0040.00416.81
8.0.240.0070.00416.82
8.0.230.0030.00516.84
8.0.220.0000.00716.88
8.0.210.0030.00316.79
8.0.200.0000.00716.89
8.0.190.0030.00517.01
8.0.180.0070.00016.95
8.0.170.0000.00716.95
8.0.160.0040.00416.98
8.0.150.0000.00716.86
8.0.140.0000.00716.78
8.0.130.0000.00513.34
8.0.120.0040.00416.75
8.0.110.0050.00316.88
8.0.100.0070.00016.98
8.0.90.0030.00516.93
8.0.80.0130.00616.84
8.0.70.0000.00716.81
8.0.60.0000.00716.79
8.0.50.0080.00016.78
8.0.30.0070.01117.03
8.0.20.0100.00817.42
8.0.10.0040.00417.01
8.0.00.0090.00916.85
7.4.330.0000.00515.55
7.4.320.0060.00016.64
7.4.300.0060.00016.61
7.4.290.0040.00416.55
7.4.280.0000.00816.60
7.4.270.0000.00716.52
7.4.260.0030.00313.29
7.4.250.0000.00716.57
7.4.240.0000.00716.48
7.4.230.0030.00316.30
7.4.220.0030.01316.63
7.4.210.0090.00316.42
7.4.200.0040.00416.62
7.4.160.0110.00616.52
7.4.150.0150.00417.40
7.4.140.0090.01117.86
7.4.130.0120.01216.51
7.4.120.0090.01016.57
7.4.110.0200.00316.47
7.4.100.0140.00416.62
7.4.90.0090.00916.57
7.4.80.0130.01019.39
7.4.70.0030.01316.44
7.4.60.0130.00316.45
7.4.50.0040.01116.64
7.4.40.0070.01016.58
7.4.30.0060.01016.35
7.4.10.0170.00014.96
7.4.00.0090.00514.83
7.3.330.0000.00513.30
7.3.320.0000.00513.32
7.3.310.0000.00716.21
7.3.300.0030.00316.19
7.3.290.0050.01016.29
7.3.280.0080.00816.28
7.3.270.0090.00917.40
7.3.260.0100.01016.39
7.3.250.0100.01216.39
7.3.240.0050.01116.37
7.3.230.0080.01016.27
7.3.210.0110.00616.48
7.3.200.0110.00816.27
7.3.190.0050.01116.33
7.3.180.0120.00416.39
7.3.170.0080.00816.50
7.3.160.0090.00616.26
7.3.130.0090.00414.89
7.3.120.0080.00714.95
7.3.110.0100.00714.88
7.3.100.0050.00814.94
7.3.90.0050.00814.71
7.3.80.0030.00914.74
7.3.70.0050.00714.75
7.3.60.0050.00714.60
7.3.50.0050.00614.56
7.3.40.0040.00914.81
7.3.30.0070.00614.62
7.3.20.0050.00516.54
7.3.10.0090.00616.56
7.3.00.0000.01016.49
7.2.330.0110.00716.74
7.2.320.0030.01516.85
7.2.310.0060.01016.47
7.2.300.0070.01016.72
7.2.290.0100.01316.77
7.2.260.0040.01514.78
7.2.250.0080.01014.87
7.2.240.0080.01114.96
7.2.230.0030.01215.20
7.2.220.0060.00415.04
7.2.210.0070.00615.22
7.2.200.0090.00514.93
7.2.190.0090.00515.04
7.2.180.0040.00714.96
7.2.170.0090.00415.08
7.2.160.0040.01115.00
7.2.150.0000.01016.83
7.2.140.0040.00416.95
7.2.130.0030.00917.14
7.2.120.0050.00316.89
7.2.110.0000.01116.96
7.2.100.0070.00716.62
7.2.90.0070.00716.93
7.2.80.0110.00416.91
7.2.70.0060.00617.05
7.2.60.0080.00716.92
7.2.50.0090.00516.88
7.2.40.0090.00616.95
7.2.30.0060.00317.07
7.2.20.0000.01116.69
7.2.10.0030.01316.90
7.2.00.0030.01118.32
7.1.330.0050.00915.77
7.1.320.0060.00515.85
7.1.310.0020.01015.47
7.1.300.0080.00415.89
7.1.290.0030.00815.50
7.1.280.0040.00515.69
7.1.270.0060.00415.50
7.1.260.0030.00715.55
7.1.250.0080.00415.82
7.1.240.0070.00315.61
7.1.230.0000.01015.70
7.1.220.0030.01015.91
7.1.210.0000.00815.85
7.1.200.0090.00515.67
7.1.190.0030.00915.69
7.1.180.0060.00915.80
7.1.170.0060.00615.46
7.1.160.0000.01115.80
7.1.150.0030.01015.72
7.1.140.0040.00415.65
7.1.130.0070.00315.64
7.1.120.0030.01015.43
7.1.110.0110.00315.80
7.1.100.0030.01315.89
7.1.90.0030.01115.85
7.1.80.0030.00715.93
7.1.70.0030.00816.60
7.1.60.0550.01124.38
7.1.50.0170.00824.35
7.1.40.0120.01024.04
7.1.30.0120.01324.17
7.1.20.0270.00824.14
7.1.10.0620.00715.29
7.1.00.0120.01215.15
7.0.330.0060.00615.09
7.0.320.0030.00815.54
7.0.310.0000.00815.34
7.0.300.0070.00315.22
7.0.290.0070.00415.59
7.0.280.0060.00315.63
7.0.270.0030.00715.57
7.0.260.0030.00815.25
7.0.250.0040.00815.48
7.0.240.0030.00915.50
7.0.230.0060.00615.47
7.0.220.0000.01415.54
7.0.210.0090.00615.48
7.0.200.0020.01315.11
7.0.190.0050.00815.26
7.0.180.0320.00714.99
7.0.170.0050.01014.86
7.0.160.0350.00514.92
7.0.150.0320.00715.04
7.0.140.0160.00715.16
7.0.130.0390.00715.08
7.0.120.0450.00815.03
7.0.110.0320.01415.07
7.0.100.0400.00814.95
7.0.90.0100.00714.90
7.0.80.0550.00714.83
7.0.70.0550.00514.88
7.0.60.0380.01214.79
7.0.50.0100.00815.10
7.0.40.0930.00614.11
7.0.30.0600.00514.04
7.0.20.0030.01013.94
7.0.10.0050.00714.04
7.0.00.0570.00714.13
5.6.400.0030.01014.64
5.6.390.0030.00714.56
5.6.380.0000.01014.53
5.6.370.0070.00713.89
5.6.360.0030.00914.45
5.6.350.0030.01414.34
5.6.340.0130.00014.26
5.6.330.0070.00313.98
5.6.320.0030.00914.23
5.6.310.0040.01214.55
5.6.300.0060.00314.62
5.6.290.0060.00914.63
5.6.280.0070.00414.37
5.6.270.0070.01014.39
5.6.260.0120.00314.19
5.6.250.0030.00614.42
5.6.240.0070.00714.58
5.6.230.0000.01014.36
5.6.220.0030.01014.26
5.6.210.0140.00314.23
5.6.200.0100.00314.44
5.6.190.0080.00714.38
5.6.180.0030.00614.17
5.6.170.0030.01014.27
5.6.160.0070.00714.36
5.6.150.0080.00414.55
5.6.140.0000.00914.30
5.6.130.0100.00314.20
5.6.120.0030.01014.40
5.6.110.0040.00714.07
5.6.100.0000.01414.38
5.6.90.0060.00914.17
5.6.80.0060.00914.10
5.6.70.0100.00014.55
5.6.60.0000.00914.24
5.6.50.0030.00914.37
5.6.40.0090.00014.48
5.6.30.0060.00614.14
5.6.20.0030.00614.31
5.6.10.0030.00614.42
5.6.00.0000.00914.21

preferences:
53.22 ms | 400 KiB | 5 Q