3v4l.org

run code in 300+ PHP versions simultaneously
<?php //We enable error reporting, so we see everything //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([], [$stdObject]); }catch(ErrorException $ee){ echo "Catched exception: " . $ee->getMessage() . "\n"; } echo "\n----------\n"; try { array_diff([$stdObject], [$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.0130.00716.63
8.3.50.0140.00316.48
8.3.40.0140.00718.82
8.3.30.0100.01018.80
8.3.20.0070.00021.77
8.3.10.0000.00821.92
8.3.00.0040.00417.80
8.2.180.0110.00716.38
8.2.170.0070.01022.96
8.2.160.0060.01021.18
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00420.35
8.2.120.0090.00026.35
8.2.110.0060.00322.26
8.2.100.0040.00817.64
8.2.90.0030.00519.32
8.2.80.0050.00317.97
8.2.70.0000.00917.75
8.2.60.0030.00618.04
8.2.50.0000.00919.21
8.2.40.0030.00620.55
8.2.30.0050.00219.23
8.2.20.0040.00418.14
8.2.10.0030.00518.13
8.2.00.0050.00318.04
8.1.280.0120.00325.92
8.1.270.0080.00023.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0130.00320.88
8.1.230.0070.00419.16
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0080.00317.11
8.1.190.0040.00417.53
8.1.180.0000.00818.10
8.1.170.0050.00318.39
8.1.160.0040.00418.90
8.1.150.0000.00720.16
8.1.140.0050.00319.55
8.1.130.0040.00418.91
8.1.120.0000.00817.46
8.1.110.0030.00417.46
8.1.100.0040.00417.50
8.1.90.0000.00717.45
8.1.80.0040.00417.52
8.1.70.0030.00317.50
8.1.60.0040.00417.50
8.1.50.0050.00317.48
8.1.40.0050.00317.49
8.1.30.0040.00417.71
8.1.20.0050.00217.70
8.1.10.0000.00717.61
8.1.00.0040.00417.38
8.0.300.0070.00020.21
8.0.290.0050.00316.75
8.0.280.0070.00018.47
8.0.270.0030.00317.27
8.0.260.0030.00316.91
8.0.250.0060.00017.07
8.0.240.0100.00017.01
8.0.230.0030.00516.92
8.0.220.0030.00316.95
8.0.210.0040.00416.95
8.0.200.0060.00016.91
8.0.190.0040.00417.01
8.0.180.0050.00216.95
8.0.170.0000.00717.01
8.0.160.0060.00316.84
8.0.150.0000.00716.95
8.0.140.0040.00416.88
8.0.130.0050.00013.39
8.0.120.0040.00416.92
8.0.110.0090.00016.86
8.0.100.0020.00517.02
8.0.90.0000.00717.00
8.0.80.0090.00916.92
8.0.70.0040.00416.79
8.0.60.0030.00517.04
8.0.50.0000.00716.82
8.0.30.0110.00917.11
8.0.20.0110.00817.40
8.0.10.0070.00016.97
8.0.00.0100.01216.95
7.4.330.0050.00015.55
7.4.320.0030.00316.53
7.4.300.0030.00316.37
7.4.290.0030.00316.55
7.4.280.0040.00416.63
7.4.270.0030.00316.63
7.4.260.0030.00313.35
7.4.250.0000.00716.42
7.4.240.0070.00016.50
7.4.230.0000.00716.68
7.4.220.0150.00616.55
7.4.210.0070.00716.64
7.4.200.0000.00716.35
7.4.160.0030.01216.58
7.4.150.0100.00717.40
7.4.140.0130.00617.86
7.4.130.0100.01016.46
7.4.120.0080.01216.54
7.4.110.0060.01216.52
7.4.100.0070.01416.51
7.4.90.0100.00716.66
7.4.80.0100.00619.39
7.4.70.0060.00916.66
7.4.60.0140.00316.57
7.4.50.0070.00716.48
7.4.40.0140.00916.63
7.4.30.0030.01416.70
7.4.00.0100.00715.09
7.3.330.0030.00313.38
7.3.320.0060.00013.36
7.3.310.0070.00016.44
7.3.300.0040.00416.30
7.3.290.0040.01016.39
7.3.280.0070.00916.37
7.3.270.0090.00917.40
7.3.260.0120.00516.49
7.3.250.0080.01216.45
7.3.240.0140.00816.42
7.3.230.0030.01416.42
7.3.210.0170.00616.49
7.3.200.0060.01116.39
7.3.190.0100.00716.41
7.3.180.0220.00016.42
7.3.170.0030.01316.46
7.3.160.0080.00816.43
7.2.330.0140.00316.73
7.2.320.0110.00716.77
7.2.310.0060.01116.69
7.2.300.0040.01216.74
7.2.290.0100.00716.80
7.2.80.0110.00316.38
7.2.60.0060.00617.01
7.2.50.0070.01016.85
7.2.00.0030.00619.23
7.1.200.0090.00315.55
7.1.70.0050.00317.15
7.1.60.0630.01033.34
7.1.50.0670.00733.06
7.1.40.0700.01732.57
7.1.30.0630.01332.72
7.1.20.0530.00732.98
7.1.10.0600.01014.84
7.1.00.0800.01014.93
7.0.200.0430.01314.68
7.0.190.0430.00714.90
7.0.180.0500.00714.40
7.0.170.0630.01314.26
7.0.160.0530.01714.58
7.0.150.0400.00714.57
7.0.140.0470.00714.73
7.0.130.0730.01014.50
7.0.120.0700.01314.75
7.0.110.0670.01714.57
7.0.100.0800.01014.62
7.0.90.0470.01314.45
7.0.80.0570.01014.68
7.0.70.0600.01314.43
7.0.60.0570.01014.38
7.0.50.0670.01314.62
7.0.40.0430.01014.75
7.0.30.0500.00314.60
7.0.20.0700.01014.76
7.0.10.0830.01714.62
7.0.00.0530.01014.39

preferences:
34.74 ms | 400 KiB | 5 Q