3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); abstract class Father { private static $childs = array(); public static function getChild( $child ) { if (!array_key_exists("$child", self::$childs)) { self::$childs["$child"] = new $child; } return self::$childs["$child"]; } public function __destruct() { foreach (self::$childs as $i => $child) { self::$childs[$i] = $child = null; } } } class Child1 extends Father {} class Child2 extends Father {} $child1 = Father::getChild('Child1'); $child2 = Father::getChild('Child2');

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.0100.01018.48
8.3.50.0100.00721.92
8.3.40.0030.01418.92
8.3.30.0120.00318.89
8.3.20.0060.01218.76
8.3.10.0000.00821.09
8.3.00.0000.00721.73
8.2.180.0180.00016.75
8.2.170.0110.00422.96
8.2.160.0130.00320.53
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.48
8.2.110.0040.00720.35
8.2.100.0090.00318.03
8.2.90.0040.00419.22
8.2.80.0030.00817.97
8.2.70.0000.00817.63
8.2.60.0030.00517.93
8.2.50.0080.00018.07
8.2.40.0060.00318.16
8.2.30.0040.00419.92
8.2.20.0030.00617.77
8.2.10.0040.00417.62
8.2.00.0000.00817.64
8.1.280.0040.01125.92
8.1.270.0030.00523.99
8.1.260.0060.00326.35
8.1.250.0070.01028.09
8.1.240.0060.00322.55
8.1.230.0080.00320.85
8.1.220.0030.00518.77
8.1.210.0000.00818.84
8.1.200.0060.00317.48
8.1.190.0040.00417.63
8.1.180.0030.00618.10
8.1.170.0030.00518.71
8.1.160.0000.00718.91
8.1.150.0050.00518.74
8.1.140.0070.00017.43
8.1.130.0070.00017.76
8.1.120.0070.00017.37
8.1.110.0040.00417.45
8.1.100.0000.00717.44
8.1.90.0000.00817.46
8.1.80.0000.00817.44
8.1.70.0020.00517.47
8.1.60.0080.00017.53
8.1.50.0000.00717.52
8.1.40.0000.00817.51
8.1.30.0040.00417.64
8.1.20.0000.00817.67
8.1.10.0020.00517.58
8.1.00.0080.00017.57
8.0.300.0070.00019.66
8.0.290.0060.00317.18
8.0.280.0000.00718.35
8.0.270.0090.00016.73
8.0.260.0000.00816.77
8.0.250.0030.00316.96
8.0.240.0030.00716.84
8.0.230.0000.00816.97
8.0.220.0080.00016.75
8.0.210.0070.00016.82
8.0.200.0060.00016.82
8.0.190.0000.00716.84
8.0.180.0070.00016.95
8.0.170.0000.01016.89
8.0.160.0030.00316.88
8.0.150.0000.00816.72
8.0.140.0000.00816.86
8.0.130.0000.00613.28
8.0.120.0000.00716.88
8.0.110.0000.00716.95
8.0.100.0000.00916.78
8.0.90.0000.00716.68
8.0.80.0100.00616.89
8.0.70.0000.00717.00
8.0.60.0040.00416.89
8.0.50.0070.00016.87
8.0.30.0070.01416.93
8.0.20.0130.00517.40
8.0.10.0040.00417.04
8.0.00.0100.01416.66
7.4.330.0000.00513.43
7.4.320.0000.00616.52
7.4.300.0000.00616.40
7.4.290.0050.00316.58
7.4.280.0000.00716.44
7.4.270.0040.00416.50
7.4.260.0050.00013.26
7.4.250.0000.00716.51
7.4.240.0000.00716.56
7.4.230.0070.00016.54
7.4.220.0130.00316.51
7.4.210.0070.00816.54
7.4.200.0000.00816.43
7.4.190.0000.00816.72
7.4.160.0100.00716.43
7.4.150.0120.00617.40
7.4.140.0080.00917.86
7.4.130.0110.00816.47
7.4.120.0090.00816.39
7.4.110.0120.00616.51
7.4.100.0060.01216.64
7.4.90.0070.01116.45
7.4.80.0100.00719.37
7.4.70.0070.01016.54
7.4.60.0120.00616.31
7.4.50.0000.00816.52
7.4.40.0030.00922.27
7.4.30.0120.00616.53
7.4.10.0100.01015.25
7.4.00.0070.01014.90
7.3.330.0000.00613.34
7.3.320.0000.00513.40
7.3.310.0070.00016.26
7.3.300.0070.00016.20
7.3.290.0060.01216.29
7.3.280.0060.00916.37
7.3.270.0160.00617.40
7.3.260.0090.00818.24
7.3.250.0130.00816.38
7.3.240.0040.01416.67
7.3.230.0110.00616.42
7.3.210.0100.00716.63
7.3.200.0150.00319.39
7.3.190.0060.01116.45
7.3.180.0030.01316.39
7.3.170.0070.01416.30
7.3.160.0030.01416.62
7.3.130.0100.00714.81
7.3.120.0140.00214.92
7.3.110.0100.00314.97
7.3.100.0020.01214.51
7.3.90.0110.00314.95
7.3.80.0080.00414.93
7.3.70.0090.00314.66
7.3.60.0070.00214.80
7.3.50.0070.00614.85
7.3.40.0040.00814.80
7.3.30.0070.00714.98
7.3.20.0020.01216.77
7.3.10.0060.00916.72
7.3.00.0090.00416.79
7.2.330.0090.00916.66
7.2.320.0070.01016.71
7.2.310.0070.01116.45
7.2.300.0090.00916.62
7.2.290.0000.01616.43
7.2.260.0030.01615.14
7.2.250.0130.00615.09
7.2.240.0020.01415.25
7.2.230.0080.00715.09
7.2.220.0080.00615.27
7.2.210.0070.00515.11
7.2.200.0070.00515.13
7.2.190.0080.00815.03
7.2.180.0060.00815.08
7.2.170.0050.00914.76
7.2.160.0050.01015.13
7.2.150.0070.00716.87
7.2.140.0080.00316.92
7.2.130.0070.00817.05
7.2.120.0060.00816.81
7.2.110.0080.00816.86
7.2.100.0080.00616.85
7.2.90.0080.00517.01
7.2.80.0020.01316.82
7.2.70.0080.00516.95
7.2.60.0050.01016.86
7.2.50.0060.00817.05
7.2.40.0060.00916.96
7.2.30.0050.01017.07
7.2.20.0070.00916.85
7.2.10.0120.00317.09
7.2.00.0060.00717.71
7.1.330.0040.01015.80
7.1.320.0090.00615.81
7.1.310.0030.00915.74
7.1.300.0040.00915.82
7.1.290.0050.00815.81
7.1.280.0090.00615.74
7.1.270.0050.00715.89
7.1.260.0020.01315.75
7.1.250.0080.00615.96
7.1.240.0040.01215.77
7.1.230.0090.00015.91
7.1.220.0000.01115.82
7.1.210.0030.00715.80
7.1.200.0030.01015.88
7.1.190.0070.00315.93
7.1.180.0120.00315.83
7.1.170.0000.01415.77
7.1.160.0060.00615.70
7.1.150.0030.00915.84
7.1.140.0070.00715.96
7.1.130.0000.01415.55
7.1.120.0030.01015.96
7.1.110.0080.00415.64
7.1.100.0060.00316.99
7.1.90.0110.00415.93
7.1.80.0080.00415.79
7.1.70.0030.00716.47
7.1.60.0070.01017.63
7.1.50.0050.01416.44
7.1.40.0040.00815.63
7.1.30.0070.00715.78
7.1.20.0060.00615.68
7.1.10.0090.00615.96
7.1.00.0060.03219.01
7.0.330.0000.01215.19
7.0.320.0040.00815.41
7.0.310.0060.00315.17
7.0.300.0040.00415.42
7.0.290.0000.01415.43
7.0.280.0080.00415.48
7.0.270.0000.01415.14
7.0.260.0030.00715.42
7.0.250.0040.01115.31
7.0.240.0030.00615.49
7.0.230.0030.01015.61
7.0.220.0000.00815.25
7.0.210.0070.00715.23
7.0.200.0070.00616.04
7.0.190.0030.01015.44
7.0.180.0050.00515.46
7.0.170.0060.00615.46
7.0.160.0140.00015.48
7.0.150.0090.00015.21
7.0.140.0010.04318.69
7.0.130.0000.01115.39
7.0.120.0070.00315.52
7.0.110.0070.00715.57
7.0.100.0030.00715.29
7.0.90.0030.00515.18
7.0.80.0000.00815.64
7.0.70.0060.03018.58
7.0.60.0060.04118.54
7.0.50.0040.02718.75
7.0.40.0050.04016.75
7.0.30.0020.04016.86
7.0.20.0070.04316.80
7.0.10.0070.04216.67
7.0.00.0100.03816.82
5.6.400.0070.01014.61
5.6.390.0030.01414.58
5.6.380.0100.00314.67
5.6.370.0090.00614.31
5.6.360.0030.00714.25
5.6.350.0000.00914.16
5.6.340.0080.00814.71
5.6.330.0070.00714.23
5.6.320.0000.01514.49
5.6.310.0000.00914.25
5.6.300.0040.00814.12
5.6.290.0060.00314.61
5.6.280.0000.04617.74
5.6.270.0100.00714.43
5.6.260.0070.00714.37
5.6.250.0060.00914.18
5.6.240.0040.00414.25
5.6.230.0030.00914.59
5.6.220.0120.03517.60
5.6.210.0030.03717.60
5.6.200.0040.03717.72
5.6.190.0020.04917.63
5.6.180.0080.03817.76
5.6.170.0070.04017.72
5.6.160.0030.03517.90
5.6.150.0060.04517.56
5.6.140.0060.03717.67
5.6.130.0070.03817.84
5.6.120.0070.02817.86
5.6.110.0050.02817.69
5.6.100.0080.03517.68
5.6.90.0090.03917.69
5.6.80.0060.02217.34
5.6.70.0040.04417.34
5.6.60.0080.04117.40
5.6.50.0100.02817.36
5.6.40.0070.02517.31
5.6.30.0110.03017.54
5.6.20.0000.04717.38
5.6.10.0030.03817.46
5.6.00.0030.04517.38
5.5.380.0070.00414.73
5.5.370.0110.00314.50
5.5.360.0080.03217.47
5.5.350.0070.03717.26
5.5.340.0080.02817.59
5.5.330.0100.03817.70
5.5.320.0050.02317.60
5.5.310.0070.02917.53
5.5.300.0110.04117.79
5.5.290.0020.05017.49
5.5.280.0090.04217.56
5.5.270.0100.03917.62
5.5.260.0040.04517.66
5.5.250.0050.04717.43
5.5.240.0020.04517.22
5.5.230.0100.04317.25
5.5.220.0070.03817.32
5.5.210.0090.03517.20
5.5.200.0070.04217.28
5.5.190.0060.03017.26
5.5.180.0000.03717.29
5.5.170.0060.00314.23
5.5.160.0090.03517.45
5.5.150.0050.04017.21
5.5.140.0030.04517.19
5.5.130.0120.03717.36
5.5.120.0030.04516.90
5.5.110.0050.03717.35
5.5.100.0030.04517.20
5.5.90.0050.03017.31
5.5.80.0020.02517.21
5.5.70.0050.03017.09
5.5.60.0030.03017.18
5.5.50.0030.02717.25
5.5.40.0020.03717.05
5.5.30.0110.02817.12
5.5.20.0050.04217.22
5.5.10.0070.03017.02
5.5.00.0110.03417.28
5.4.450.0090.04116.14
5.4.440.0030.03516.04
5.4.430.0040.02616.12
5.4.420.0000.04415.98
5.4.410.0010.04416.02
5.4.400.0050.04015.94
5.4.390.0030.04215.95
5.4.380.0050.03915.96
5.4.370.0030.03915.98
5.4.360.0000.04615.92
5.4.350.0000.03415.91
5.4.340.0040.03315.82
5.4.330.0040.00712.79
5.4.320.0050.03515.84
5.4.310.0020.04016.01
5.4.300.0000.04015.96
5.4.290.0070.03216.01
5.4.280.0030.03015.92
5.4.270.0060.04115.97
5.4.260.0050.02415.98
5.4.250.0030.02415.85
5.4.240.0050.03315.93
5.4.230.0030.04015.83
5.4.220.0030.04015.95
5.4.210.0000.02715.98
5.4.200.0030.02616.01
5.4.190.0030.04015.90
5.4.180.0060.03715.91
5.4.170.0060.03115.93
5.4.160.0000.02915.84
5.4.150.0120.03715.81
5.4.140.0060.03614.52
5.4.130.0050.03214.65
5.4.120.0050.03114.59
5.4.110.0060.04114.67
5.4.100.0040.03514.57
5.4.90.0000.03414.56
5.4.80.0020.03314.66
5.4.70.0020.03614.61
5.4.60.0020.03614.58
5.4.50.0060.04014.61
5.4.40.0050.03714.62
5.4.30.0020.02314.59
5.4.20.0040.02714.60
5.4.10.0060.04014.57
5.4.00.0020.04214.34
5.3.290.0050.03213.73
5.3.280.0010.03513.68
5.3.270.0030.03013.76
5.3.260.0000.03913.70
5.3.250.0000.03813.66
5.3.240.0020.03413.77
5.3.230.0050.02313.67
5.3.220.0070.03713.69
5.3.210.0000.03013.70
5.3.200.0020.03513.65
5.3.190.0050.03513.68
5.3.180.0030.03813.71
5.3.170.0030.03513.65
5.3.160.0010.03313.73
5.3.150.0020.04013.71
5.3.140.0050.03613.73
5.3.130.0080.03813.70
5.3.120.0030.04213.65
5.3.110.0050.04013.73
5.3.100.0060.03713.41
5.3.90.0000.04313.44
5.3.80.0050.03613.42
5.3.70.0030.02713.43
5.3.60.0050.03513.44
5.3.50.0020.04213.38
5.3.40.0050.04013.34
5.3.30.0050.03713.30
5.3.20.0050.03213.31
5.3.10.0030.02613.27
5.3.00.0030.02513.26
5.2.170.0030.05712.47
5.2.160.0070.05712.47
5.2.150.0030.05012.47
5.2.140.0030.05712.47
5.2.130.0030.06012.47
5.2.120.0030.05712.47
5.2.110.0030.05312.47
5.2.100.0000.05012.47
5.2.90.0030.06012.47
5.2.80.0000.04312.47
5.2.70.0030.06012.47
5.2.60.0030.06012.47
5.2.50.0000.05712.47
5.2.40.0100.05012.47
5.2.30.0070.05312.47
5.2.20.0000.06312.47
5.2.10.0030.06312.47
5.2.00.0000.06712.47
5.1.60.0030.04712.47
5.1.50.0000.03712.47
5.1.40.0030.04312.47
5.1.30.0000.05712.47
5.1.20.0000.05012.47
5.1.10.0030.05312.47
5.1.00.0030.05712.47
5.0.50.0030.02012.47
5.0.40.0000.04312.47
5.0.30.0070.05012.47
5.0.20.0030.03312.47
5.0.10.0000.04712.47
5.0.00.0000.06012.47
4.4.90.0030.03012.47
4.4.80.0000.03312.47
4.4.70.0000.03712.47
4.4.60.0070.02012.47
4.4.50.0000.03312.47
4.4.40.0000.04712.47
4.4.30.0000.03712.47
4.4.20.0030.02012.47
4.4.10.0000.02012.47
4.4.00.0000.03712.47
4.3.110.0000.02312.47
4.3.100.0030.03012.47
4.3.90.0000.02712.47
4.3.80.0000.05012.47
4.3.70.0000.03012.47
4.3.60.0030.02712.47
4.3.50.0030.02712.47
4.3.40.0000.04712.47
4.3.30.0030.01712.47
4.3.20.0030.02312.47
4.3.10.0000.03312.47
4.3.00.0030.01712.47

preferences:
46.49 ms | 401 KiB | 5 Q