3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace Foo; class StreamHandler { public $errorMessage; public function __construct() { $this->errorMessage = null; set_error_handler([$this, 'customErrorHandler']); $stream = fopen('c:/fososdfsdfsd', 'a'); restore_error_handler(); } private function customErrorHandler(int $code, string $msg): bool { $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); return true; } } function fopen() { throw new \Exception(); } try{ $f = new StreamHandler; var_dump($f->errorMessage); }catch (\Throwable){ } $a = []; var_dump($a[1]);

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.5.70.0070.00118.61
8.5.60.0080.00618.93
8.5.50.0100.00716.88
8.5.30.0110.00719.46
8.5.20.0100.00620.27
8.5.10.0100.00619.39
8.5.00.0060.01720.42
8.4.220.0120.00624.11
8.4.210.0110.01019.50
8.4.180.0100.01125.72
8.4.170.0110.01120.48
8.4.160.0130.00921.60
8.4.150.0080.00516.95
8.4.140.0180.00517.82
8.4.130.0050.00417.97
8.4.120.0120.00824.34
8.4.110.0110.00818.71
8.4.100.0110.00618.06
8.4.90.0040.00522.41
8.4.80.0050.00318.98
8.4.70.0120.00318.93
8.4.60.0120.00718.72
8.4.50.0050.00318.89
8.4.40.0150.00617.71
8.4.30.0100.01020.64
8.4.20.0090.01322.44
8.4.10.0090.00923.99
8.3.310.0110.01018.48
8.3.300.0100.01120.69
8.3.290.0120.00820.67
8.3.280.0200.00318.49
8.3.270.0120.00816.75
8.3.260.0140.00616.91
8.3.250.0100.00918.87
8.3.240.0130.00616.60
8.3.230.0090.01116.82
8.3.220.0110.00818.99
8.3.210.0110.01116.75
8.3.200.0060.00316.69
8.3.190.0090.00617.13
8.3.180.0090.01019.11
8.3.170.0070.01316.55
8.3.160.0100.01017.28
8.3.150.0110.00718.95
8.3.140.0030.01219.10
8.3.130.0090.00018.53
8.3.120.0080.00418.90
8.3.110.0070.00320.94
8.3.100.0080.00024.06
8.3.90.0030.00626.77
8.3.80.0030.00718.55
8.3.70.0140.00316.86
8.3.60.0110.00716.75
8.3.50.0090.01316.64
8.3.40.0090.00621.76
8.3.30.0070.00720.21
8.3.20.0080.00024.18
8.3.10.0070.00024.66
8.3.00.0030.00526.16
8.2.310.0100.01118.14
8.2.300.0140.00622.32
8.2.290.0100.00818.93
8.2.280.0050.00418.36
8.2.270.0160.00318.69
8.2.260.0100.01016.67
8.2.250.0080.00016.92
8.2.240.0070.01017.32
8.2.230.0030.00622.58
8.2.220.0060.01237.54
8.2.210.0070.00726.77
8.2.200.0090.00016.63
8.2.190.0170.00318.79
8.2.180.0000.02025.92
8.2.170.0060.01018.81
8.2.160.0000.01422.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0050.00221.05
8.2.110.0090.00022.26
8.2.100.0040.01217.72
8.2.90.0030.00517.91
8.2.80.0000.00919.19
8.2.70.0140.00417.25
8.2.60.0140.00517.56
8.2.50.0140.00517.38
8.2.40.0090.00717.38
8.2.30.0100.00817.48
8.2.20.0100.00317.61
8.2.10.0150.00217.56
8.2.00.0130.00317.56
8.1.340.0090.01017.80
8.1.330.0110.00818.29
8.1.320.0140.00616.28
8.1.310.0140.00316.62
8.1.300.0090.00018.49
8.1.290.0060.00330.84
8.1.280.0110.00425.92
8.1.270.0000.00824.66
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0060.00323.88
8.1.230.0040.00822.66
8.1.220.0030.00617.79
8.1.210.0080.00018.77
8.1.200.0110.00617.24
8.1.190.0140.00217.11
8.1.180.0140.00317.25
8.1.170.0130.00317.11
8.1.160.0110.00516.99
8.1.150.0150.00217.24
8.1.140.0110.00617.17
8.1.130.0160.00117.13
8.1.120.0090.00717.42
8.1.110.0110.00617.13
8.1.100.0100.00617.23
8.1.90.0110.00617.06
8.1.80.0080.00817.24
8.1.70.0110.00517.42
8.1.60.0090.00917.37
8.1.50.0110.00717.30
8.1.40.0120.00817.38
8.1.30.0110.00717.30
8.1.20.0110.00817.30
8.1.10.0080.01017.29
8.1.00.0140.00517.25
8.0.300.0000.00720.09
8.0.290.0130.00416.63
8.0.280.0140.00316.59
8.0.270.0130.00416.59
8.0.260.0100.00716.74
8.0.250.0150.00316.60
8.0.240.0140.00316.66
8.0.230.0120.00516.63
8.0.220.0100.00716.60
8.0.210.0070.01016.67
8.0.200.0120.00516.61
8.0.190.0150.00116.75
8.0.180.0110.00616.63
8.0.170.0030.01316.81
8.0.160.0110.00616.66
8.0.150.0130.00516.67
8.0.140.0130.00316.69
8.0.130.0100.00716.60
8.0.120.0130.00416.58
8.0.110.0130.00316.68
8.0.100.0130.00516.59
8.0.90.0150.00116.58
8.0.80.0130.00416.60
8.0.70.0110.00616.61
8.0.60.0140.00316.58
8.0.50.0170.00016.63
8.0.30.0120.00416.60
8.0.20.0130.00316.75
8.0.10.0090.00816.67

preferences:
46.43 ms | 1162 KiB | 5 Q