3v4l.org

run code in 300+ PHP versions simultaneously
<?php class IOException extends Exception { protected $file; public function __construct($file, $message) { parent::__construct($message); $this->file = $file; } public function getPath() { return $this->file; } } class File { protected $path; protected $handle; public function __construct($path) { $this->path = $path; } public function open($mode) { $this->handle = @fopen($this->path, $mode); if (!$this->handle) { throw new IOException($this->path, "could not open the file"); } } } $file = new File("/no/file"); try { $file->open("r"); } catch (IOException $io) { printf( "Exception occured opening %s\n", $io->getPath()); $io->printStackTrace(); } ?>

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.0060.00918.31
8.3.50.0140.00921.20
8.3.40.0190.00318.71
8.3.30.0170.00320.21
8.3.20.0080.00020.16
8.3.10.0050.00320.97
8.3.00.0090.00922.40
8.2.180.0060.01516.88
8.2.170.0070.00718.96
8.2.160.0150.00622.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0100.00326.16
8.2.120.0140.00020.67
8.2.110.0060.00319.30
8.2.100.0080.00417.91
8.2.90.0040.00418.96
8.2.80.0000.01117.97
8.2.70.0090.00017.38
8.2.60.0030.00617.90
8.2.50.0040.00418.10
8.2.40.0060.00317.97
8.2.30.0050.00319.40
8.2.20.0000.00717.43
8.2.10.0040.00417.45
8.2.00.0090.00017.65
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0140.00328.09
8.1.240.0030.00619.13
8.1.230.0080.00417.54
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0040.00416.98
8.1.180.0000.00918.10
8.1.170.0050.00318.53
8.1.160.0040.00418.80
8.1.150.0080.00018.58
8.1.140.0060.00317.29
8.1.130.0040.00417.69
8.1.120.0000.00817.34
8.1.110.0030.00517.35
8.1.100.0050.00217.38
8.1.90.0070.00017.25
8.1.80.0070.00017.39
8.1.70.0030.00517.36
8.1.60.0060.00317.32
8.1.50.0000.00917.41
8.1.40.0080.00017.40
8.1.30.0000.00817.52
8.1.20.0000.00917.55
8.1.10.0040.00417.44
8.1.00.0070.00017.18
8.0.300.0080.00018.77
8.0.290.0080.00016.75
8.0.280.0000.00718.54
8.0.270.0000.00717.38
8.0.260.0080.00016.98
8.0.250.0000.00717.03
8.0.240.0030.00517.12
8.0.230.0040.00417.14
8.0.220.0030.00517.04
8.0.210.0000.00717.05
8.0.200.0030.00317.03
8.0.190.0040.00417.12
8.0.180.0000.00717.14
8.0.170.0030.00516.98
8.0.160.0040.00416.99
8.0.150.0040.00416.95
8.0.140.0060.00316.89
8.0.130.0070.00013.53
8.0.120.0050.00317.11
8.0.110.0000.00816.91
8.0.100.0050.00317.15
8.0.90.0040.00417.06
8.0.80.0040.01117.00
8.0.70.0040.00416.96
8.0.60.0000.00816.95
8.0.50.0040.00416.92
8.0.30.0110.01117.18
8.0.20.0090.01117.40
8.0.10.0050.00317.17
8.0.00.0100.01016.84
7.4.330.0000.00516.79
7.4.320.0040.00416.62
7.4.300.0070.00016.68
7.4.290.0000.00716.64
7.4.280.0030.00316.52
7.4.270.0080.00016.64
7.4.260.0000.00613.23
7.4.250.0000.00916.64
7.4.240.0000.00716.59
7.4.230.0000.00716.39
7.4.220.0070.01316.53
7.4.210.0060.01016.58
7.4.200.0000.00716.62
7.4.190.0000.00816.73
7.4.160.0110.00716.80
7.4.150.0120.00617.40
7.4.140.0140.00317.86
7.4.130.0080.00816.55
7.4.120.0120.00416.47
7.4.110.0100.00716.56
7.4.100.0030.01416.62
7.4.90.0070.01416.48
7.4.80.0200.00019.39
7.4.70.0090.00916.56
7.4.60.0190.00316.74
7.4.50.0000.00816.50
7.4.40.0030.00922.77
7.4.30.0100.01216.48
7.4.00.0050.00914.96
7.3.330.0000.00613.43
7.3.320.0000.00713.39
7.3.310.0040.00416.48
7.3.300.0060.00016.50
7.3.290.0060.00916.45
7.3.280.0040.01216.43
7.3.270.0110.00617.40
7.3.260.0120.00718.24
7.3.250.0090.01016.62
7.3.240.0080.00916.44
7.3.230.0060.01116.57
7.3.210.0110.00616.42
7.3.200.0060.01219.39
7.3.190.0120.01116.45
7.3.180.0100.00716.59
7.3.170.0060.01016.55
7.3.160.0090.00616.53
7.3.120.0070.00714.92
7.3.110.0100.00614.59
7.3.100.0100.00615.11
7.3.90.0040.01214.87
7.3.80.0030.01314.84
7.3.70.0060.00614.84
7.3.60.0060.01014.90
7.3.50.0080.00814.70
7.3.40.0030.01014.95
7.3.30.0030.00715.04
7.3.20.0060.00616.78
7.3.10.0000.01116.49
7.3.00.0070.00716.76
7.2.330.0090.00916.90
7.2.320.0100.00716.81
7.2.310.0100.00716.43
7.2.300.0030.01316.85
7.2.290.0090.01216.84
7.2.250.0080.00815.34
7.2.240.0030.01315.29
7.2.230.0070.00715.11
7.2.220.0070.00414.76
7.2.210.0040.00815.29
7.2.200.0040.01214.90
7.2.190.0030.01515.27
7.2.180.0080.00315.12
7.2.170.0030.01314.98
7.2.60.0060.01017.07
7.2.00.0030.00919.46
7.1.330.0060.00915.53
7.1.320.0040.00815.94
7.1.310.0000.01515.91
7.1.300.0080.00815.84
7.1.290.0100.00015.89
7.1.280.0100.00615.87
7.1.270.0030.01015.85
7.1.260.0030.01115.84
7.1.200.0000.01415.87
7.1.100.0040.00718.03
7.1.70.0000.00917.13
7.1.60.0070.01719.17
7.1.50.0090.01216.71
7.1.00.0000.04322.25
7.0.200.0000.00716.69
7.0.140.0070.06722.22
7.0.120.0030.08022.00
7.0.110.0070.08722.14
7.0.100.0000.05721.91
7.0.90.0030.04721.99
7.0.80.0030.06722.11
7.0.70.0070.05721.96
7.0.60.0030.06721.93
7.0.50.0170.05321.95
7.0.40.0100.07719.99
7.0.30.0100.04720.02
7.0.20.0030.04320.01
7.0.10.0070.05720.08
7.0.00.0000.04320.01
5.6.280.0030.07721.00
5.6.270.0070.07021.10
5.6.260.0070.03721.09
5.6.250.0030.05320.84
5.6.240.0100.07720.85
5.6.230.0030.04720.76
5.6.220.0000.09020.94
5.6.210.0030.07021.04
5.6.200.0100.08320.77
5.6.190.0070.08321.00
5.6.180.0100.07320.89
5.6.170.0130.05320.90
5.6.160.0100.05320.97
5.6.150.0030.04021.03
5.6.140.0030.08720.81
5.6.130.0100.06320.89
5.6.120.0100.08021.04
5.6.110.0100.06720.92
5.6.100.0030.07021.01
5.6.90.0000.06320.98
5.6.80.0030.07020.41
5.6.70.0100.06720.14
5.6.60.0030.08020.38
5.6.50.0030.07020.18
5.6.40.0030.05020.39
5.6.30.0070.08020.14
5.6.20.0000.08320.33
5.6.10.0100.06020.35
5.6.00.0030.04020.39
5.5.380.0030.04017.69
5.5.370.0130.07017.70
5.5.360.0070.05317.68
5.5.350.0030.07717.68
5.5.340.0030.08317.96
5.5.330.0070.08017.91
5.5.320.0170.07318.10
5.5.310.0070.07318.09
5.5.300.0030.07317.93
5.5.290.0030.06317.95
5.5.280.0070.04018.06
5.5.270.0000.08317.89
5.5.260.0130.07318.04
5.5.250.0070.07317.88
5.5.240.0000.08017.36
5.5.230.0030.07317.61
5.5.220.0030.06717.30
5.5.210.0000.04717.60
5.5.200.0030.07317.28
5.5.190.0030.08317.45
5.5.180.0070.05017.57
5.5.160.0100.07317.57
5.5.150.0130.07317.48
5.5.140.0030.07017.57
5.5.130.0030.04717.42
5.5.120.0030.06317.57
5.5.110.0000.08317.57
5.5.100.0100.07017.36
5.5.90.0030.05017.18
5.5.80.0070.05017.32
5.5.70.0000.08017.30
5.5.60.0000.04017.20
5.5.50.0030.03717.34
5.5.40.0030.06717.20
5.5.30.0000.04017.16
5.5.20.0070.03717.30
5.5.10.0000.04017.28
5.5.00.0030.04017.32
5.4.450.0030.06719.22
5.4.440.0000.08319.22
5.4.430.0030.08319.41
5.4.420.0000.09319.23
5.4.410.0070.05319.44
5.4.400.0100.06718.87
5.4.390.0030.05018.91
5.4.380.0070.08019.13
5.4.370.0070.06718.86
5.4.360.0030.05718.91
5.4.350.0070.06719.13
5.4.340.0030.07018.98
5.4.320.0070.07019.04
5.4.310.0030.04318.91
5.4.300.0130.07018.86
5.4.290.0100.04018.89
5.4.280.0030.05019.10
5.4.270.0070.07318.99
5.4.260.0070.04319.16
5.4.250.0000.06718.92
5.4.240.0100.04719.11
5.4.230.0030.06319.31
5.4.220.0100.07019.00
5.4.210.0070.03318.85
5.4.200.0070.05719.04
5.4.190.0000.04319.15
5.4.180.0000.04318.85
5.4.170.0030.04019.11
5.4.160.0000.04018.98
5.4.150.0070.03719.22
5.4.140.0000.03716.32
5.4.130.0100.02716.42
5.4.120.0000.03716.59
5.4.110.0030.03716.45
5.4.100.0030.03716.36
5.4.90.0000.04016.43
5.4.80.0030.04716.57
5.4.70.0000.06016.40
5.4.60.0030.07716.53
5.4.50.0000.05016.45
5.4.40.0030.07016.48
5.4.30.0100.03016.43
5.4.20.0070.05316.37
5.4.10.0030.04316.44
5.4.00.0030.03315.75
5.3.290.0000.07314.70
5.3.280.0100.05314.62
5.3.270.0070.05014.63
5.3.260.0030.04014.60
5.3.250.0000.03714.76
5.3.240.0000.04014.71
5.3.230.0030.05714.61
5.3.220.0000.03714.73
5.3.210.0070.03314.62
5.3.200.0070.03314.61
5.3.190.0070.05314.71
5.3.180.0000.03714.66
5.3.170.0000.04714.54
5.3.160.0000.07314.59
5.3.150.0000.04014.72
5.3.140.0070.03314.45
5.3.130.0000.08014.71
5.3.120.0000.06714.65
5.3.110.0000.07314.58
5.3.100.0030.03714.15
5.3.90.0000.03714.07
5.3.80.0070.03313.99
5.3.70.0030.05314.18
5.3.60.0000.04714.03
5.3.50.0000.04314.04
5.3.40.0100.05713.96
5.3.30.0030.05313.90
5.3.20.0030.03313.72
5.3.10.0030.03013.67
5.3.00.0000.03713.66
5.2.170.0030.04311.25
5.2.160.0030.03011.31
5.2.150.0000.03011.25
5.2.140.0000.03011.16
5.2.130.0030.04711.11
5.2.120.0030.02711.27
5.2.110.0030.02711.35
5.2.100.0070.03311.07
5.2.90.0100.02011.35
5.2.80.0070.06010.97
5.2.70.0000.03011.13
5.2.60.0030.03011.04
5.2.50.0030.02711.18
5.2.40.0000.03711.04
5.2.30.0030.06011.05
5.2.20.0000.05710.97
5.2.10.0070.02710.90
5.2.00.0000.03010.76
5.1.60.0000.02310.08
5.1.50.0000.0439.98
5.1.40.0000.0239.96
5.1.30.0030.05310.21
5.1.20.0070.03010.46
5.1.10.0030.05310.15
5.1.00.0030.04710.10
5.0.50.0000.0479.73
5.0.40.0070.0139.73
5.0.30.0000.0339.73
5.0.20.0030.0409.73
5.0.10.0000.0339.73
5.0.00.0000.0279.73
4.4.90.0000.0239.73
4.4.80.0000.0139.73
4.4.70.0030.0279.73
4.4.60.0000.0139.73
4.4.50.0000.0209.73
4.4.40.0030.0209.73
4.4.30.0000.0139.73
4.4.20.0030.0179.73
4.4.10.0030.0309.73
4.4.00.0070.0509.73
4.3.110.0000.0309.73
4.3.100.0000.0279.73
4.3.90.0000.0239.73
4.3.80.0030.0209.73
4.3.70.0030.0239.73
4.3.60.0000.0209.73
4.3.50.0000.0279.73
4.3.40.0030.0509.73
4.3.30.0000.0209.73
4.3.20.0030.0339.73
4.3.10.0000.0279.73
4.3.00.0000.0339.73

preferences:
41.69 ms | 401 KiB | 5 Q