3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); ini_set('display_errors', 1); set_error_handler(function (int $severity, string $message, string $filename, int $line) { echo "throwing\n"; throw new ErrorException($message, 0, $severity, $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(["hello"], [$stdObject]); }catch(ErrorException $ee){ echo "Catched exception: " . $ee->getMessage() . "\n"; } echo "\n----------\n"; try { array_diff([$stdObject], ["hello"]); }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.70.0150.00016.63
8.3.60.0160.00618.68
8.3.50.0070.00917.42
8.3.40.0070.01418.84
8.3.30.0070.00718.66
8.3.20.0070.00021.82
8.3.10.0040.00421.91
8.3.00.0050.00318.05
8.2.190.0050.01016.63
8.2.180.0070.00718.79
8.2.170.0150.00322.96
8.2.160.0030.01021.15
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00021.07
8.2.110.0090.00019.30
8.2.100.0070.00418.18
8.2.90.0040.00419.52
8.2.80.0000.00918.03
8.2.70.0060.00317.80
8.2.60.0040.00418.03
8.2.50.0000.00918.10
8.2.40.0000.00720.59
8.2.30.0070.00019.25
8.2.20.0000.01018.21
8.2.10.0000.00718.10
8.2.00.0000.00718.04
8.1.280.0070.00725.92
8.1.270.0040.00422.19
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00321.97
8.1.230.0080.00419.13
8.1.220.0070.00317.79
8.1.210.0030.00718.77
8.1.200.0040.00417.35
8.1.190.0080.00017.23
8.1.180.0080.00018.10
8.1.170.0040.00418.54
8.1.160.0030.00322.22
8.1.150.0040.00420.05
8.1.140.0040.00419.66
8.1.130.0050.00318.93
8.1.120.0000.00717.40
8.1.110.0040.00417.39
8.1.100.0040.00417.50
8.1.90.0040.00417.36
8.1.80.0000.00717.48
8.1.70.0030.00317.52
8.1.60.0040.00417.64
8.1.50.0030.00617.46
8.1.40.0030.00517.51
8.1.30.0040.00417.63
8.1.20.0070.00017.67
8.1.10.0080.00017.62
8.1.00.0040.00417.56
8.0.300.0070.00019.82
8.0.290.0080.00016.75
8.0.280.0040.00418.44
8.0.270.0070.00017.28
8.0.260.0030.00316.83
8.0.250.0000.00717.04
8.0.240.0060.00317.07
8.0.230.0000.00716.95
8.0.220.0000.00716.98
8.0.210.0040.00416.95
8.0.200.0030.00317.06
8.0.190.0040.00417.07
8.0.180.0070.00016.90
8.0.170.0000.00716.90
8.0.160.0000.00717.00
8.0.150.0000.00716.80
8.0.140.0040.00416.83
8.0.130.0060.00013.38
8.0.120.0050.00216.84
8.0.110.0040.00416.91
8.0.100.0040.00417.02
8.0.90.0070.00016.86
8.0.80.0070.01016.96
8.0.70.0040.00416.89
8.0.60.0040.00416.89
8.0.50.0040.00417.02
8.0.30.0100.00917.09
8.0.20.0170.00617.40
8.0.10.0050.00317.00
8.0.00.0120.00616.58
7.4.330.0000.00515.55
7.4.320.0000.00616.52
7.4.300.0030.00316.62
7.4.290.0070.00016.43
7.4.280.0050.00316.45
7.4.270.0030.00316.55
7.4.260.0030.00313.33
7.4.250.0000.00816.62
7.4.240.0030.00516.65
7.4.230.0000.00716.34
7.4.220.0100.00716.64
7.4.210.0060.00916.54
7.4.200.0000.00716.52
7.4.160.0090.00816.62
7.4.150.0120.00617.40
7.4.140.0160.00417.86
7.4.130.0040.02416.70
7.4.120.0120.00816.57
7.4.110.0070.01716.59
7.4.100.0130.01016.55
7.4.90.0060.01116.47
7.4.80.0140.00419.39
7.4.70.0130.00316.64
7.4.60.0130.00316.52
7.4.50.0090.00316.46
7.4.40.0030.01316.59
7.4.30.0030.01816.49
7.4.00.0030.01015.11
7.3.330.0060.00013.38
7.3.320.0060.00013.25
7.3.310.0000.00716.39
7.3.300.0000.00616.28
7.3.290.0090.00616.39
7.3.280.0080.00816.40
7.3.270.0110.00717.40
7.3.260.0110.00716.61
7.3.250.0140.00616.46
7.3.240.0080.01016.52
7.3.230.0060.01216.59
7.3.210.0060.01216.46
7.3.200.0100.01016.53
7.3.190.0030.01216.66
7.3.180.0060.01616.43
7.3.170.0090.00916.44
7.3.160.0090.00916.38
7.2.330.0080.00816.71
7.2.320.0060.01316.70
7.2.310.0100.00716.84
7.2.300.0080.00816.72
7.2.290.0120.00616.52
7.2.60.0300.00317.03
7.1.200.0040.00715.69
7.1.70.0000.01116.86
7.1.60.1600.01332.87
7.1.50.1770.01332.79
7.1.40.1600.01732.61
7.1.30.0270.02032.62
7.1.20.0170.02032.77
7.1.10.0000.01714.69
7.1.00.1330.01714.82
7.0.200.1130.00715.01
7.0.190.0100.00714.84
7.0.180.1100.01014.40
7.0.170.0000.01314.24
7.0.160.1000.01314.62
7.0.150.1300.01314.25
7.0.140.0700.01014.48
7.0.130.1000.01314.50
7.0.120.0770.00714.73
7.0.110.1270.00714.54
7.0.100.0870.00714.60
7.0.90.0800.01314.40
7.0.80.1270.01014.69
7.0.70.1030.01014.70
7.0.60.1270.00714.49
7.0.50.0730.01314.46
7.0.40.0900.00314.84
7.0.30.0830.00714.58
7.0.20.0730.01014.62
7.0.10.0730.01014.66
7.0.00.0600.01314.68

preferences:
31.88 ms | 401 KiB | 5 Q