3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function init ( $resources = null ) { if ( ! $resources ) $resources = get_class_methods(__CLASS__); foreach ( $resources as $method ) { if ( ! ( substr($method, 0, 5) == '_init' ) ) $method = '_init' . $method; if ( ! method_exists(__CLASS__, $method)) continue; self::$method(); } } protected static function _initCharset () { var_dump('Charset'); } protected static function _initConfig () { var_dump('Config'); } protected static function _initDoctrine () { var_dump('Doctrine'); } protected static function _initCookie () { var_dump('Cookie'); } protected static function _initA () { var_dump('A'); } }

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.40.0120.00318.53
8.3.30.0120.00318.85
8.3.20.0000.00820.21
8.3.10.0000.00721.64
8.3.00.0050.00319.26
8.2.170.0090.00622.96
8.2.160.0070.00720.57
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0050.00319.11
8.2.110.0060.00321.19
8.2.100.0000.01219.35
8.2.90.0040.00419.09
8.2.80.0030.00517.97
8.2.70.0030.00617.50
8.2.60.0040.00417.79
8.2.50.0030.00518.07
8.2.40.0000.00819.82
8.2.30.0070.00017.87
8.2.20.0030.00517.66
8.2.10.0040.00418.01
8.2.00.0040.00417.60
8.1.270.0080.00018.65
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00320.96
8.1.230.0080.00417.54
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.10
8.1.190.0040.00417.11
8.1.180.0090.00018.10
8.1.170.0060.00320.32
8.1.160.0000.00721.88
8.1.150.0000.00818.68
8.1.140.0000.00717.32
8.1.130.0030.00317.76
8.1.120.0000.00717.29
8.1.110.0040.00417.34
8.1.100.0040.00417.31
8.1.90.0040.00417.34
8.1.80.0000.00717.30
8.1.70.0000.00817.28
8.1.60.0000.01017.48
8.1.50.0080.00017.28
8.1.40.0030.00617.27
8.1.30.0050.00317.38
8.1.20.0070.00017.54
8.1.10.0110.00017.41
8.1.00.0000.00717.33
8.0.300.0000.00818.77
8.0.290.0000.00716.63
8.0.280.0000.00718.20
8.0.270.0000.00717.13
8.0.260.0070.00017.00
8.0.250.0030.00316.73
8.0.240.0000.00816.71
8.0.230.0060.00316.72
8.0.220.0000.00716.75
8.0.210.0040.00416.71
8.0.200.0000.00716.80
8.0.190.0000.00816.79
8.0.180.0030.00316.85
8.0.170.0040.00416.82
8.0.160.0080.00016.77
8.0.150.0000.00716.59
8.0.140.0040.00416.77
8.0.130.0000.00713.13
8.0.120.0000.00716.75
8.0.110.0040.00416.73
8.0.100.0040.00416.79
8.0.90.0050.00216.78
8.0.80.0040.01616.74
8.0.70.0080.00016.81
8.0.60.0070.00016.88
8.0.50.0000.00716.70
8.0.30.0160.00717.02
8.0.20.0070.01217.40
8.0.10.0050.00216.88
8.0.00.0080.00916.60
7.4.330.0000.00615.03
7.4.320.0060.00016.46
7.4.300.0000.00616.38
7.4.290.0040.00416.42
7.4.280.0040.00416.29
7.4.270.0000.00716.40
7.4.260.0030.00316.37
7.4.250.0030.00416.43
7.4.240.0020.00516.30
7.4.230.0070.00016.58
7.4.220.0160.01016.30
7.4.210.0140.00416.43
7.4.200.0000.00716.25
7.4.160.0100.00716.36
7.4.150.0100.01317.40
7.4.140.0090.01017.86
7.4.130.0140.01016.39
7.4.120.0070.01116.42
7.4.110.0140.00716.37
7.4.100.0030.01316.34
7.4.90.0130.00316.49
7.4.80.0000.01719.39
7.4.70.0130.00716.36
7.4.60.0130.00416.49
7.4.50.0060.00316.30
7.4.40.0130.00616.22
7.4.30.0080.01116.32
7.4.00.0100.00614.97
7.3.330.0050.00013.19
7.3.320.0120.00413.20
7.3.310.0030.00316.27
7.3.300.0040.00416.19
7.3.290.0080.00616.16
7.3.280.0080.01016.15
7.3.270.0100.00617.40
7.3.260.0120.00616.25
7.3.250.0140.00416.45
7.3.240.0080.00816.18
7.3.230.0130.00616.40
7.3.210.0110.00716.13
7.3.200.0070.01119.39
7.3.190.0070.01416.34
7.3.180.0150.00316.08
7.3.170.0110.00716.33
7.3.160.0120.00316.21
7.3.10.0070.01116.55
7.3.00.0060.00916.48
7.2.330.0080.00816.33
7.2.320.0070.01016.54
7.2.310.0160.00016.43
7.2.300.0060.01016.36
7.2.290.0060.01616.32
7.2.130.0030.01216.77
7.2.120.0040.01216.61
7.2.110.0060.00916.59
7.2.100.0100.00316.75
7.2.90.0070.00716.64
7.2.80.0030.00716.61
7.2.70.0000.01416.74
7.2.60.0110.00316.76
7.2.50.0060.00316.77
7.2.40.0120.00316.84
7.2.30.0090.00616.83
7.2.20.0080.00316.68
7.2.10.0110.00416.70
7.2.00.0060.00817.83
7.1.250.0120.00015.64
7.1.200.0050.00315.63
7.1.100.0000.00817.84
7.1.70.0000.01016.94
7.1.60.0060.01819.50
7.1.50.0030.02016.97
7.1.00.0100.07022.51
7.0.200.0450.00014.50
7.0.140.0000.07321.91
7.0.60.0030.04019.91
7.0.50.0100.07717.88
7.0.40.0030.04320.12
7.0.30.0230.06020.23
7.0.20.0230.04020.05
7.0.10.0370.05320.09
7.0.00.0070.04020.05
5.6.280.0070.07021.11
5.6.210.0070.08020.75
5.6.200.0100.07018.16
5.6.190.0030.09320.49
5.6.180.0230.05020.60
5.6.170.0200.08320.48
5.6.160.0100.06020.46
5.6.150.0070.06718.18
5.6.140.0030.08018.25
5.6.130.0030.06318.23
5.6.120.0100.07320.98
5.6.110.0000.04320.98
5.6.100.0100.04020.87
5.6.90.0100.08020.98
5.6.80.0100.05320.45
5.6.70.0170.07320.41
5.5.350.0300.06020.48
5.5.340.0070.03718.05
5.5.330.0130.05020.43
5.5.320.0000.09020.38
5.5.310.0170.04320.35
5.5.300.0070.06718.09
5.5.290.0030.05318.04
5.5.280.0070.08720.85
5.5.270.0130.07720.96
5.5.260.0130.03720.78
5.5.250.0130.08020.59
5.5.240.0130.07020.27
5.4.450.0270.06019.70
5.4.440.0930.05319.42
5.4.430.0630.06019.38
5.4.420.0070.06019.57
5.4.410.0170.05719.04
5.4.400.0570.07718.77
5.4.390.0530.05318.62
5.4.380.0630.06718.76
5.4.370.0330.08318.61
5.4.360.0470.06718.77
5.4.350.0530.05318.78
5.4.340.0400.06718.77
5.4.320.0700.07718.76
5.4.310.0500.08018.54
5.4.300.0570.06718.57
5.4.290.0370.05718.54
5.4.280.0430.07718.59
5.4.270.0370.06318.78
5.4.260.0430.05318.60
5.4.250.0470.05718.59
5.4.240.0630.05718.75
5.4.230.0570.05018.69
5.4.220.0670.06718.56
5.4.210.0500.08018.80
5.4.200.0870.06016.77
5.4.190.0600.06318.55
5.4.180.0300.08018.74
5.4.170.0500.05018.62
5.4.160.1070.08018.72
5.4.150.0500.06318.54
5.4.140.0470.04716.34
5.4.130.0300.05316.45
5.4.120.1800.06016.20
5.4.110.0330.05016.32
5.4.100.0230.05716.34
5.4.90.0400.07016.21
5.4.80.0200.06016.29
5.4.70.0570.05316.17
5.4.60.0500.06016.18
5.4.50.0370.05316.30
5.4.40.0430.06716.24
5.4.30.0400.05316.16
5.4.20.0570.05316.16
5.4.10.0300.05016.27
5.4.00.0430.05015.71
5.3.290.0430.05314.67
5.3.280.0200.07314.73
5.3.270.0330.06314.75
5.3.260.0330.07014.83
5.3.250.0300.06714.81
5.3.240.0370.06714.66
5.3.230.0470.07714.79
5.3.220.0400.05714.67
5.3.210.0530.07014.67
5.3.200.0430.05714.55
5.3.190.0430.05314.71
5.3.180.0470.06014.62
5.3.170.0330.06014.75
5.3.160.0330.06314.59
5.3.150.0300.06714.75
5.3.140.0430.06014.70
5.3.130.0270.06714.65
5.3.120.0470.06014.57
5.3.110.0570.06014.61
5.3.100.0470.06314.06
5.3.90.0430.05714.15
5.3.80.0330.06014.15
5.3.70.0500.06314.24
5.3.60.0470.07314.06
5.3.50.0430.06314.05
5.3.40.1330.05013.95
5.3.30.0370.07014.03
5.3.20.0300.06313.74
5.3.10.0470.06713.70
5.3.00.0230.06013.68
5.2.170.0170.05011.13
5.2.160.0300.04011.19
5.2.150.0200.05011.22
5.2.140.0130.06311.20
5.2.130.0270.05711.14
5.2.120.0130.05311.33
5.2.110.0270.05311.18
5.2.100.0170.04311.26
5.2.90.0270.05711.13
5.2.80.0300.06011.23
5.2.70.0270.04711.22
5.2.60.0400.05011.10
5.2.50.0270.05711.07
5.2.40.0300.04010.98
5.2.30.0370.04011.03
5.2.20.0230.04011.07
5.2.10.0300.04310.88
5.2.00.0330.04710.77
5.1.60.0200.04310.18
5.1.50.0330.02710.14
5.1.40.0170.04010.01
5.1.30.0300.03710.45
5.1.20.0200.04010.41
5.1.10.0170.04710.14
5.1.00.0130.04010.19
5.0.50.0070.0408.65
5.0.40.0130.0338.44
5.0.30.0070.0538.36
5.0.20.0100.0308.39
5.0.10.0070.0378.21
5.0.00.0130.0478.36
4.4.90.0130.0175.94
4.4.80.0070.0275.89
4.4.70.0070.0275.86
4.4.60.0030.0375.91
4.4.50.0170.0276.02
4.4.40.0200.0375.88
4.4.30.0170.0275.88
4.4.20.0070.0376.01
4.4.10.0130.0305.93
4.4.00.0070.0475.93
4.3.110.0070.0375.84
4.3.100.0100.0335.84
4.3.90.0170.0275.83
4.3.80.0170.0435.79
4.3.70.0070.0335.78
4.3.60.0200.0235.79
4.3.50.0100.0305.81
4.3.40.0130.0435.86
4.3.30.0100.0235.35
4.3.20.0030.0305.35
4.3.10.0170.0205.35
4.3.00.0170.0176.67

preferences:
44.35 ms | 400 KiB | 5 Q