3v4l.org

run code in 300+ PHP versions simultaneously
<?php class IOException extends Exception { protected $path; public function __construct($path, $message) { parent::__construct($message); $this->path = $path; } public function getPath() { return $this->path; } } 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()); var_dump($io); } ?>

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.0080.01318.56
8.3.50.0060.01221.02
8.3.40.0070.00718.84
8.3.30.0170.00320.34
8.3.20.0100.00320.35
8.3.10.0040.00420.93
8.3.00.0080.00022.08
8.2.180.0180.00416.75
8.2.170.0090.00622.96
8.2.160.0100.01020.53
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00319.36
8.2.110.0060.00319.24
8.2.100.0130.00017.97
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0030.00718.33
8.2.30.0040.00419.46
8.2.20.0040.00417.73
8.2.10.0040.00417.64
8.2.00.0080.00017.67
8.1.280.0150.00325.92
8.1.270.0040.00422.05
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0060.00323.97
8.1.230.0120.00020.88
8.1.220.0050.00318.77
8.1.210.0000.01019.09
8.1.200.0030.00617.35
8.1.190.0040.00417.66
8.1.180.0080.00018.10
8.1.170.0080.00018.64
8.1.160.0070.00018.93
8.1.150.0040.00418.68
8.1.140.0050.00317.32
8.1.130.0000.00717.86
8.1.120.0040.00417.54
8.1.110.0040.00417.39
8.1.100.0040.00417.43
8.1.90.0000.00717.40
8.1.80.0030.00417.46
8.1.70.0000.00717.45
8.1.60.0000.00817.63
8.1.50.0000.00717.61
8.1.40.0000.00917.61
8.1.30.0040.00417.70
8.1.20.0080.00017.68
8.1.10.0090.00017.63
8.1.00.0030.00517.43
8.0.300.0040.00419.73
8.0.290.0000.00717.03
8.0.280.0030.00318.54
8.0.270.0000.00717.26
8.0.260.0030.00318.56
8.0.250.0000.00817.13
8.0.240.0040.00417.16
8.0.230.0070.00017.09
8.0.220.0000.00716.94
8.0.210.0000.00717.09
8.0.200.0000.00617.14
8.0.190.0000.00816.99
8.0.180.0040.00417.09
8.0.170.0000.00916.96
8.0.160.0050.00317.04
8.0.150.0080.00016.97
8.0.140.0050.00216.92
8.0.130.0030.00313.46
8.0.120.0050.00317.00
8.0.110.0040.00416.90
8.0.100.0050.00217.08
8.0.90.0000.00816.96
8.0.80.0090.00617.02
8.0.70.0000.00816.97
8.0.60.0050.00316.94
8.0.50.0040.00417.07
8.0.30.0140.00617.32
8.0.20.0140.00817.40
8.0.10.0050.00317.14
8.0.00.0120.01116.81
7.4.330.0050.00016.77
7.4.320.0040.00416.58
7.4.300.0060.00016.54
7.4.290.0070.00016.50
7.4.280.0040.00416.53
7.4.270.0040.00416.53
7.4.260.0030.00313.31
7.4.250.0040.00416.46
7.4.240.0040.00316.50
7.4.230.0000.00716.57
7.4.220.0100.01016.61
7.4.210.0100.00916.59
7.4.200.0000.00716.61
7.4.190.0000.00716.50
7.4.160.0130.00316.76
7.4.150.0140.00617.40
7.4.140.0150.00617.86
7.4.130.0070.01016.62
7.4.120.0060.01216.59
7.4.110.0170.00716.64
7.4.100.0090.00916.42
7.4.90.0070.01116.59
7.4.80.0070.01719.39
7.4.70.0130.00416.54
7.4.60.0060.01516.56
7.4.50.0060.00316.44
7.4.40.0080.00622.77
7.4.30.0160.00616.44
7.4.00.0060.00914.68
7.3.330.0000.00513.25
7.3.320.0030.00313.26
7.3.310.0030.00316.35
7.3.300.0030.00316.38
7.3.290.0000.02016.50
7.3.280.0090.01016.45
7.3.270.0040.01417.40
7.3.260.0090.01118.24
7.3.250.0130.00516.48
7.3.240.0090.00916.42
7.3.230.0090.00916.61
7.3.210.0070.01316.47
7.3.200.0100.01019.39
7.3.190.0090.00716.41
7.3.180.0100.00616.63
7.3.170.0030.01216.59
7.3.160.0030.01316.54
7.3.120.0060.01114.69
7.3.110.0210.00314.56
7.3.100.0280.00014.86
7.3.90.0120.00514.36
7.3.80.0090.00914.37
7.3.70.0170.00814.29
7.3.60.0060.00914.39
7.3.50.0040.01214.60
7.3.40.0110.01214.25
7.3.30.0170.01314.45
7.3.20.0150.01014.82
7.3.10.0170.00314.64
7.3.00.0160.00014.64
7.2.330.0100.01016.80
7.2.320.0150.00316.90
7.2.310.0070.01116.45
7.2.300.0110.00716.75
7.2.290.0070.01116.91
7.2.250.0080.00814.89
7.2.240.0160.00514.95
7.2.230.0240.00315.08
7.2.220.0110.00615.04
7.2.210.0000.01714.48
7.2.200.0110.00914.61
7.2.190.0110.00414.84
7.2.180.0110.00714.80
7.2.170.0190.00014.32
7.2.160.0170.00815.02
7.2.150.0170.01015.20
7.2.140.0200.00415.33
7.2.130.0270.00315.16
7.2.120.0170.00415.00
7.2.110.0060.01614.92
7.2.100.0120.01014.93
7.2.90.0150.00815.27
7.2.80.0160.00515.26
7.2.70.0330.00015.14
7.2.60.0120.00616.00
7.2.50.0140.01115.06
7.2.40.0140.01215.11
7.2.30.0140.00715.24
7.2.20.0090.01215.14
7.2.10.0150.00815.08
7.2.00.0110.00617.06
7.1.330.0150.01113.92
7.1.320.0160.00013.87
7.1.310.0160.00813.88
7.1.300.0110.00413.93
7.1.290.0130.00313.80
7.1.280.0140.00714.13
7.1.270.0200.00513.76
7.1.260.0140.00714.03
7.1.250.0210.00413.81
7.1.240.0100.01113.70
7.1.230.0160.00713.64
7.1.220.0150.01314.05
7.1.210.0080.01413.90
7.1.200.0080.00714.87
7.1.190.0250.00313.71
7.1.180.0140.01114.14
7.1.170.0080.01213.98
7.1.160.0150.01413.87
7.1.150.0170.00413.94
7.1.140.0190.00713.91
7.1.130.0120.00814.02
7.1.120.0190.00514.02
7.1.110.0180.00413.98
7.1.100.0100.00815.88
7.1.90.0080.00813.97
7.1.80.0360.01613.93
7.1.70.0180.01115.46
7.1.60.0170.01316.42
7.1.50.0090.01515.49
7.1.40.0050.01313.56
7.1.30.0150.00513.66
7.1.20.0110.01113.72
7.1.10.0200.02013.87
7.1.00.0110.02618.11
7.0.330.0150.00713.16
7.0.320.0050.01413.49
7.0.310.0120.00613.44
7.0.300.0110.01113.29
7.0.290.0120.00813.73
7.0.280.0060.01413.83
7.0.270.0160.01013.54
7.0.260.0140.01113.57
7.0.250.0120.01113.71
7.0.240.0090.00913.46
7.0.230.0130.01413.80
7.0.220.0340.02213.21
7.0.210.0310.00813.68
7.0.200.0150.00415.31
7.0.190.0100.01013.18
7.0.180.0210.00013.48
7.0.170.0120.00813.59
7.0.160.0050.01513.74
7.0.150.0040.01413.61
7.0.140.0080.03917.78
7.0.130.0100.01013.46
7.0.120.0070.01213.55
7.0.110.0140.00513.61
7.0.100.0130.04116.75
7.0.90.0130.03616.83
7.0.80.0080.03716.72
7.0.70.0170.04416.80
7.0.60.0100.03716.74
7.0.50.0150.04216.94
7.0.40.0190.03516.86
7.0.30.0060.03116.93
7.0.20.0110.04416.75
7.0.10.0130.02816.82
7.0.00.0190.04016.83
5.6.400.0170.00514.53
5.6.390.0210.00414.40
5.6.380.0170.00714.37
5.6.370.0120.00713.93
5.6.360.0080.01314.13
5.6.350.0110.01114.33
5.6.340.0100.01314.57
5.6.330.0180.00314.40
5.6.320.0060.01314.32
5.6.310.0130.00614.34
5.6.300.0130.00514.07
5.6.290.0080.01114.08
5.6.280.0120.03417.87
5.6.270.0150.00614.60
5.6.260.0290.00714.60
5.6.250.0170.03217.55
5.6.240.0160.04017.45
5.6.230.0070.05217.59
5.6.220.0090.03017.48
5.6.210.0150.03717.51
5.6.200.0200.04517.58
5.6.190.0170.04017.76
5.6.180.0090.03117.83
5.6.170.0130.02617.63
5.6.160.0170.04017.74
5.6.150.0100.04517.73
5.6.140.0130.04117.63
5.6.130.0120.04217.75
5.6.120.0070.02617.71
5.6.110.0150.02217.76
5.6.100.0050.02817.56
5.6.90.0110.02917.72
5.6.80.0110.02017.24
5.6.70.0070.03717.37
5.6.60.0070.03517.41
5.6.50.0090.02417.39
5.6.40.0050.03017.38
5.6.30.0060.04617.22
5.6.20.0070.02317.31
5.6.10.0090.02317.31
5.6.00.0130.04617.32
5.5.380.0100.04717.35
5.5.370.0080.04017.26
5.5.360.0150.04217.27
5.5.350.0160.03817.40
5.5.340.0110.02717.53
5.5.330.0110.04317.50
5.5.320.0140.03917.68
5.5.310.0120.04417.46
5.5.300.0090.04417.61
5.5.290.0110.04317.50
5.5.280.0100.02517.63
5.5.270.0150.03417.60
5.5.260.0100.02317.38
5.5.250.0090.02617.28
5.5.240.0080.03517.33
5.5.230.0070.02317.09
5.5.220.0080.03417.20
5.5.210.0100.03817.27
5.5.200.0110.04617.18
5.5.190.0070.03917.25
5.5.180.0130.04317.21
5.5.170.0130.00814.49
5.5.160.0070.02617.18
5.5.150.0130.04217.19
5.5.140.0060.03017.23
5.5.130.0050.02817.14
5.5.120.0050.02617.05
5.5.110.0060.02517.12
5.5.100.0100.02117.13
5.5.90.0090.02417.12
5.5.80.0050.02817.24
5.5.70.0140.02017.19
5.5.60.0120.02017.30
5.5.50.0070.02516.86
5.5.40.0120.01917.04
5.5.30.0090.02717.00
5.5.20.0110.02117.05
5.5.10.0140.01817.28
5.5.00.0090.02616.98
5.4.450.0080.03315.19
5.4.440.0100.02915.15
5.4.430.0040.02615.13
5.4.420.0110.02015.11
5.4.410.0080.02115.22
5.4.400.0050.02615.14
5.4.390.0070.01915.06
5.4.380.0190.03015.00
5.4.370.0000.03515.02
5.4.360.0060.02315.06
5.4.350.0060.04015.08
5.4.340.0070.03515.11
5.4.330.0110.00511.09
5.4.320.0110.03915.13
5.4.310.0110.03815.06
5.4.300.0140.03715.07
5.4.290.0070.02715.08
5.4.280.0040.02515.15
5.4.270.0020.02915.04
5.4.260.0050.02514.94
5.4.250.0060.02114.94
5.4.240.0110.01714.86
5.4.230.0120.01814.98
5.4.220.0110.01615.07
5.4.210.0080.02714.91
5.4.200.0070.02015.19
5.4.190.0070.03915.11
5.4.180.0080.02115.03
5.4.170.0060.02514.73
5.4.160.0100.02314.95
5.4.150.0070.04115.02
5.4.140.0040.02713.75
5.4.130.0050.02113.86
5.4.120.0130.02713.87
5.4.110.0070.02213.89
5.4.100.0070.02313.85
5.4.90.0120.03213.71
5.4.80.0040.04413.64
5.4.70.0080.03813.75
5.4.60.0090.03213.66
5.4.50.0030.04513.51
5.4.40.0050.04213.60
5.4.30.0120.03513.58
5.4.20.0160.01713.79
5.4.10.0110.02213.67
5.4.00.0090.04013.42
5.3.290.0090.01912.67
5.3.280.0070.02012.59
5.3.270.0100.02912.68
5.3.260.0130.03612.72
5.3.250.0110.02012.72
5.3.240.0070.04112.47
5.3.230.0070.02512.69
5.3.220.0050.02412.59
5.3.210.0050.02112.46
5.3.200.0080.01912.57
5.3.190.0090.03212.61
5.3.180.0150.02212.67
5.3.170.0080.04012.68
5.3.160.0110.02212.71
5.3.150.0100.03512.46
5.3.140.0020.04612.54
5.3.130.0190.03212.47
5.3.120.0080.04112.53
5.3.110.0070.03812.62
5.3.100.0080.03912.33
5.3.90.0070.03512.37
5.3.80.0080.03012.30
5.3.70.0090.04112.18
5.3.60.0110.03512.21
5.3.50.0020.04412.33
5.3.40.0050.04212.27
5.3.30.0190.03812.29
5.3.20.0100.03812.25
5.3.10.0090.03812.09
5.3.00.0040.03912.09
5.2.170.0090.03010.81
5.2.160.0110.02710.84
5.2.150.0040.02210.81
5.2.140.0080.01910.84
5.2.130.0090.02210.79
5.2.120.0090.02010.79
5.2.110.0040.03510.76
5.2.100.0080.03110.82
5.2.90.0070.01810.69
5.2.80.0080.02810.79
5.2.70.0070.02910.68
5.2.60.0090.02510.79
5.2.50.0100.02810.76
5.2.40.0060.03210.65
5.2.30.0050.03210.72
5.2.20.0050.02910.75
5.2.10.0050.03410.70
5.2.00.0020.03910.57
5.1.60.0050.01810.52
5.1.50.0050.03010.52
5.1.40.0050.02510.52
5.1.30.0060.03110.52
5.1.20.0040.03210.52
5.1.10.0040.03510.52
5.1.00.0060.01810.52
5.0.50.0000.02510.52
5.0.40.0050.02310.52
5.0.30.0050.03510.52
5.0.20.0060.02410.52
5.0.10.0050.01810.52
5.0.00.0060.03310.52
4.4.90.0000.02310.52
4.4.80.0040.01910.52
4.4.70.0060.01810.52
4.4.60.0070.01310.52
4.4.50.0060.01110.52
4.4.40.0020.02710.52
4.4.30.0050.01210.52
4.4.20.0070.01710.52
4.4.10.0040.01810.52
4.4.00.0050.02710.52
4.3.110.0030.02010.52
4.3.100.0050.01710.52
4.3.90.0030.01310.52
4.3.80.0040.02410.52
4.3.70.0070.01510.52
4.3.60.0020.01210.52
4.3.50.0000.02210.52
4.3.40.0020.02810.52
4.3.30.0010.02110.52
4.3.20.0010.02010.52
4.3.10.0040.00810.52
4.3.00.0000.02010.52

preferences:
50.94 ms | 400 KiB | 5 Q