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([$stdObject], [$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.0090.00916.63
8.3.50.0150.00616.23
8.3.40.0160.00318.82
8.3.30.0120.00618.84
8.3.20.0080.00021.62
8.3.10.0030.00623.45
8.3.00.0030.00617.80
8.2.180.0100.00718.52
8.2.170.0110.00419.15
8.2.160.0040.01122.96
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00020.35
8.2.120.0040.00426.35
8.2.110.0060.00319.37
8.2.100.0000.01117.84
8.2.90.0050.00318.16
8.2.80.0060.00319.17
8.2.70.0050.00317.91
8.2.60.0050.00518.03
8.2.50.0000.00719.25
8.2.40.0030.00520.61
8.2.30.0050.00219.29
8.2.20.0000.00718.16
8.2.10.0040.00418.16
8.2.00.0040.00417.97
8.1.280.0110.00325.92
8.1.270.0030.00522.17
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0050.00522.11
8.1.230.0030.01021.04
8.1.220.0030.00617.74
8.1.210.0040.00419.02
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0030.00518.10
8.1.170.0000.00818.57
8.1.160.0040.00418.93
8.1.150.0080.00020.09
8.1.140.0040.00419.54
8.1.130.0040.00419.03
8.1.120.0050.00317.53
8.1.110.0070.00017.49
8.1.100.0000.00817.43
8.1.90.0000.00817.50
8.1.80.0000.00717.49
8.1.70.0040.00417.44
8.1.60.0040.00417.53
8.1.50.0040.00417.51
8.1.40.0030.00517.52
8.1.30.0030.00517.74
8.1.20.0000.00817.73
8.1.10.0080.00017.66
8.1.00.0040.00417.47
8.0.300.0030.00620.16
8.0.290.0050.00316.75
8.0.280.0040.00418.47
8.0.270.0030.00317.19
8.0.260.0060.00016.82
8.0.250.0000.00816.96
8.0.240.0050.00517.06
8.0.230.0000.00716.94
8.0.220.0000.00716.90
8.0.210.0000.00716.99
8.0.200.0000.00717.02
8.0.190.0050.00317.05
8.0.180.0030.00517.03
8.0.170.0040.00417.00
8.0.160.0040.00416.88
8.0.150.0040.00416.84
8.0.140.0000.00716.94
8.0.130.0050.00013.33
8.0.120.0040.00416.99
8.0.110.0000.00716.90
8.0.100.0060.00316.79
8.0.90.0030.00516.92
8.0.80.0090.00616.89
8.0.70.0040.00417.05
8.0.60.0030.00516.88
8.0.50.0040.00416.84
8.0.30.0120.00617.09
8.0.20.0100.01117.40
8.0.10.0070.00017.09
8.0.00.0120.00616.75
7.4.330.0030.00315.55
7.4.320.0030.00316.68
7.4.300.0000.00616.56
7.4.290.0020.00516.66
7.4.280.0000.00916.57
7.4.270.0000.00716.56
7.4.260.0060.00013.30
7.4.250.0000.00716.62
7.4.240.0000.00716.55
7.4.230.0030.00316.63
7.4.220.0060.01016.69
7.4.210.0130.00016.55
7.4.200.0000.00816.67
7.4.160.0030.01316.59
7.4.150.0090.00917.40
7.4.140.0110.00917.86
7.4.130.0150.01316.50
7.4.120.0140.00716.54
7.4.110.0060.01216.72
7.4.100.0140.01116.61
7.4.90.0060.01416.49
7.4.80.0160.01019.39
7.4.70.0040.01216.52
7.4.60.0130.00316.52
7.4.50.0090.00316.53
7.4.40.0120.00916.50
7.4.30.0140.00416.62
7.4.10.0100.00815.13
7.4.00.0060.01114.89
7.3.330.0030.00313.22
7.3.320.0040.00413.38
7.3.310.0030.00516.38
7.3.300.0000.00616.41
7.3.290.0070.00716.41
7.3.280.0070.00916.36
7.3.270.0120.00617.40
7.3.260.0050.01216.48
7.3.250.0110.01216.46
7.3.240.0070.01116.41
7.3.230.0050.01316.44
7.3.210.0030.01316.43
7.3.200.0100.00716.43
7.3.190.0000.01516.52
7.3.180.0000.01616.51
7.3.170.0080.00816.47
7.3.160.0120.00316.45
7.3.130.0070.00815.11
7.3.120.0050.01015.03
7.3.110.0050.01414.94
7.3.100.0050.00915.00
7.3.90.0060.01115.01
7.3.80.0070.00715.04
7.3.70.0080.00715.02
7.3.60.0050.00915.04
7.3.50.0110.00515.06
7.3.40.0080.00315.09
7.3.30.0060.00814.99
7.3.20.0060.00716.61
7.3.10.0050.00716.61
7.3.00.0070.00816.76
7.2.330.0140.00316.34
7.2.320.0090.00916.47
7.2.310.0100.00716.87
7.2.300.0030.01416.48
7.2.290.0030.01316.80
7.2.260.0080.01015.17
7.2.250.0100.00915.22
7.2.240.0100.00715.34
7.2.230.0030.00815.03
7.2.220.0070.01115.23
7.2.210.0060.00815.11
7.2.200.0050.00815.08
7.2.190.0020.01315.17
7.2.180.0040.00915.08
7.2.170.0040.01015.16
7.2.160.0090.00515.02
7.2.150.0070.00716.92
7.2.140.0080.00416.94
7.2.130.0070.00616.74
7.2.120.0060.00816.82
7.2.110.0070.00716.77
7.2.100.0050.00816.92
7.2.90.0050.01016.89
7.2.80.0080.00316.98
7.2.70.0050.01017.03
7.2.60.0080.00416.97
7.2.50.0080.00516.77
7.2.40.0060.00717.00
7.2.30.0090.00616.82
7.2.20.0030.01217.03
7.2.10.0020.01016.70
7.2.00.0080.00817.75
7.1.330.0050.00815.80
7.1.320.0030.00915.76
7.1.310.0030.00915.81
7.1.300.0070.00715.57
7.1.290.0040.00715.55
7.1.280.0030.01215.85
7.1.270.0070.00915.74
7.1.260.0070.00515.76
7.1.250.0040.00915.75
7.1.240.0040.00615.87
7.1.230.0040.00815.91
7.1.220.0030.00815.69
7.1.210.0040.01115.56
7.1.200.0040.01115.78
7.1.190.0060.00915.70
7.1.180.0030.00815.84
7.1.170.0040.01015.90
7.1.160.0060.00715.67
7.1.150.0030.00815.85
7.1.140.0020.01115.71
7.1.130.0050.00715.54
7.1.120.0050.00615.68
7.1.110.0060.00615.78
7.1.100.0060.00715.74
7.1.90.0020.01015.70
7.1.80.0060.00615.88
7.1.70.0050.00616.06
7.1.60.0550.00821.61
7.1.50.0110.00921.52
7.1.40.0450.01021.35
7.1.30.0420.01121.39
7.1.20.0320.01121.46
7.1.10.0300.00615.32
7.1.00.0120.01015.42
7.0.330.0030.00615.48
7.0.320.0050.00715.37
7.0.310.0050.00915.27
7.0.300.0080.00515.39
7.0.290.0070.00715.41
7.0.280.0030.00915.35
7.0.270.0070.00515.48
7.0.260.0070.00515.22
7.0.250.0000.01115.43
7.0.240.0030.00815.46
7.0.230.0120.00415.44
7.0.220.0050.01115.50
7.0.210.0020.01315.32
7.0.200.0100.01315.18
7.0.190.0420.01015.11
7.0.180.0380.00915.13
7.0.170.0300.00915.10
7.0.160.0040.01015.15
7.0.150.0260.00715.10
7.0.140.0060.01015.08
7.0.130.0330.01115.29
7.0.120.0060.01015.08
7.0.110.0250.00815.13
7.0.100.0210.00815.24
7.0.90.0060.00915.18
7.0.80.0280.00515.14
7.0.70.0090.00315.22
7.0.60.0220.01115.02
7.0.50.0400.00915.19
7.0.40.0280.00914.38
7.0.30.0050.01114.45
7.0.20.0400.00914.37
7.0.10.0270.00914.42
7.0.00.0050.00814.40
5.6.400.0050.00914.74
5.6.390.0050.01114.70
5.6.380.0040.01014.67
5.6.370.0050.00614.55
5.6.360.0030.01014.82
5.6.350.0090.00514.75
5.6.340.0080.00614.78
5.6.330.0060.00314.78
5.6.320.0040.01014.67
5.6.310.0040.01014.48
5.6.300.0040.00714.61
5.6.290.0050.01314.73
5.6.280.0040.00914.77
5.6.270.0100.00514.66
5.6.260.0050.01014.80
5.6.250.0030.00814.77
5.6.240.0090.00514.77
5.6.230.0080.00814.73
5.6.220.0060.00914.69
5.6.210.0030.01014.69
5.6.200.0040.00714.75
5.6.190.0060.00814.68
5.6.180.0030.01114.77
5.6.170.0050.01214.68
5.6.160.0110.00514.61
5.6.150.0080.00714.74
5.6.140.0050.00714.72
5.6.130.0050.00614.69
5.6.120.0060.00414.80
5.6.110.0020.00714.67
5.6.100.0030.00914.66
5.6.90.0020.01114.63
5.6.80.0050.00914.62
5.6.70.0060.00814.71
5.6.60.0050.01014.69
5.6.50.0030.01114.61
5.6.40.0030.01214.64
5.6.30.0030.01114.76
5.6.20.0030.01014.73
5.6.10.0060.00614.67
5.6.00.0070.00514.70

preferences:
58.56 ms | 401 KiB | 5 Q