3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public static function describe() { echo "--> " . ($calculated = "I am a " . get_called_class() . "\n"); static $cached = null; if ($cached === null) { $cached = $calculated; } return $cached; } } class Animal extends Base { public static function describe() { return 'Hello! ' . parent::describe(); } } class Cat extends Animal { } class Dog extends Animal { } echo Cat::describe(); echo Dog::describe(); echo Animal::describe();

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.01216.50
8.3.50.0070.00718.31
8.3.40.0120.00918.97
8.3.30.0150.00418.96
8.3.20.0040.00420.07
8.3.10.0030.00521.77
8.3.00.0050.00319.25
8.2.180.0140.00317.94
8.2.170.0070.00722.96
8.2.160.0100.00620.38
8.2.150.0000.00724.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0060.00319.50
8.2.110.0070.00319.39
8.2.100.0090.00317.75
8.2.90.0040.00419.15
8.2.80.0040.00417.97
8.2.70.0080.00017.63
8.2.60.0000.00818.04
8.2.50.0040.00418.07
8.2.40.0050.00318.12
8.2.30.0070.00017.93
8.2.20.0000.00817.66
8.2.10.0090.00018.05
8.2.00.0030.00517.62
8.1.280.0200.00325.92
8.1.270.0000.00723.99
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0030.00622.19
8.1.230.0110.00017.48
8.1.220.0040.00417.75
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0030.00620.44
8.1.160.0080.00021.94
8.1.150.0000.00718.80
8.1.140.0030.00518.91
8.1.130.0040.00417.88
8.1.120.0040.00417.48
8.1.110.0070.00017.52
8.1.100.0040.00417.45
8.1.90.0030.00517.37
8.1.80.0040.00417.46
8.1.70.0000.00817.48
8.1.60.0000.00917.57
8.1.50.0040.00417.42
8.1.40.0030.00517.55
8.1.30.0040.00417.63
8.1.20.0030.00517.56
8.1.10.0070.00017.56
8.1.00.0040.00417.49
8.0.300.0020.00518.77
8.0.290.0070.00016.75
8.0.280.0000.00718.44
8.0.270.0040.00416.68
8.0.260.0000.00617.25
8.0.250.0050.00216.97
8.0.240.0070.00016.95
8.0.230.0030.00316.93
8.0.220.0040.00416.89
8.0.210.0040.00416.86
8.0.200.0030.00316.98
8.0.190.0070.00016.82
8.0.180.0070.00016.94
8.0.170.0000.00816.81
8.0.160.0050.00316.97
8.0.150.0000.00816.85
8.0.140.0000.00816.82
8.0.130.0050.00013.36
8.0.120.0040.00416.78
8.0.110.0000.00716.86
8.0.100.0000.00716.84
8.0.90.0000.00716.73
8.0.80.0120.00416.84
8.0.70.0000.00716.83
8.0.60.0070.00016.78
8.0.50.0000.00716.88
8.0.30.0070.01017.17
8.0.20.0200.01717.40
8.0.10.0080.00017.05
8.0.00.0110.00616.74
7.4.330.0000.00515.07
7.4.320.0030.00316.57
7.4.300.0070.00016.59
7.4.290.0030.00316.60
7.4.280.0040.00416.50
7.4.270.0000.00616.52
7.4.260.0000.01016.38
7.4.250.0020.00516.47
7.4.240.0060.00116.47
7.4.230.0000.00816.60
7.4.220.0040.01416.57
7.4.210.0070.01216.54
7.4.200.0070.00016.34
7.4.160.0150.00016.26
7.4.150.0120.00617.40
7.4.140.0140.00417.86
7.4.130.0130.00816.62
7.4.120.0070.00916.48
7.4.110.0100.01316.68
7.4.100.0100.00716.36
7.4.90.0090.01216.39
7.4.80.0100.00719.39
7.4.70.0120.00616.29
7.4.60.0070.01016.57
7.4.50.0030.00316.25
7.4.40.0060.01216.54
7.4.30.0030.01416.42
7.4.00.0110.00714.73
7.3.330.0000.00513.35
7.3.320.0100.00313.23
7.3.310.0030.00316.24
7.3.300.0030.00316.36
7.3.290.0070.00016.24
7.3.280.0080.01016.37
7.3.270.0090.01217.40
7.3.260.0070.01016.47
7.3.250.0120.00916.36
7.3.240.0060.01316.51
7.3.230.0060.01616.42
7.3.210.0030.01416.55
7.3.200.0140.01019.39
7.3.190.0250.02116.28
7.3.180.0100.00616.64
7.3.170.0170.00416.54
7.3.160.0140.00316.50
7.3.120.0080.01014.88
7.3.110.0080.01014.86
7.3.100.0060.00714.96
7.3.90.0070.00814.93
7.3.80.0000.01014.71
7.3.70.0050.00714.91
7.3.60.0070.00414.86
7.3.50.0070.00714.77
7.3.40.0060.00514.71
7.3.30.0000.01014.95
7.3.20.0070.00416.59
7.3.10.0090.00516.64
7.3.00.0070.00616.63
7.2.330.0160.00616.77
7.2.320.0000.01616.41
7.2.310.0000.01716.38
7.2.300.0100.00616.82
7.2.290.0100.01116.52
7.2.250.0090.00915.20
7.2.240.0070.01315.02
7.2.230.0090.00315.04
7.2.220.0030.00815.03
7.2.210.0060.00715.21
7.2.200.0030.00715.02
7.2.190.0050.00914.80
7.2.180.0080.00814.98
7.2.170.0060.00714.97
7.2.160.0060.00315.17
7.2.150.0070.00717.02
7.2.140.0030.01016.75
7.2.130.0070.00816.96
7.2.120.0100.00116.77
7.2.110.0040.00816.82
7.2.100.0090.00517.02
7.2.90.0040.00916.67
7.2.80.0100.00516.92
7.2.70.0090.00917.00
7.2.60.0050.01216.94
7.2.50.0070.00416.93
7.2.40.0210.00917.18
7.2.30.0180.01217.31
7.2.20.0160.01017.22
7.2.10.0290.01017.18
7.2.00.0250.00917.20
7.1.330.0030.01115.67
7.1.320.0060.00715.94
7.1.310.0050.00815.78
7.1.300.0050.00415.93
7.1.290.0020.01315.87
7.1.280.0050.00715.89
7.1.270.0030.00915.87
7.1.260.0050.00815.84
7.1.250.0080.00715.57
7.1.200.0060.00615.95
7.1.160.0390.01016.73
7.1.150.0390.00816.51
7.1.140.0470.00716.96
7.1.130.0480.01316.67
7.1.120.0430.00716.70
7.1.110.0410.00816.19
7.1.100.0440.00816.32
7.1.90.0450.00916.31
7.1.80.0430.01016.09
7.1.70.0200.00716.21
7.1.60.0380.00826.38
7.1.50.0370.00924.81
7.1.40.0480.01332.65
7.1.30.0540.01232.77
7.1.20.0430.01232.69
7.1.10.0400.01214.61
7.1.00.0150.04618.46
7.0.290.0540.01216.45
7.0.270.0620.01216.71
7.0.260.0420.01016.27
7.0.250.0410.01015.94
7.0.240.0470.01015.96
7.0.230.0440.01015.96
7.0.220.0460.00715.92
7.0.210.0370.01014.61
7.0.200.0390.00615.01
7.0.190.3120.01114.86
7.0.180.0340.00714.38
7.0.170.0450.01214.28
7.0.160.0470.01014.40
7.0.150.0300.01414.30
7.0.140.0140.04318.12
7.0.130.0470.01014.73
7.0.120.0370.00914.67
7.0.110.0300.00814.52
7.0.100.0250.01014.50
7.0.90.0260.01014.38
7.0.80.0310.00914.46
7.0.70.0270.00614.39
7.0.60.0190.04017.16
7.0.50.0130.02916.17
7.0.40.0150.04017.31
7.0.30.0280.02717.28
7.0.20.0250.02317.31
7.0.10.0300.03117.29
7.0.00.0160.02617.41
5.6.300.0170.06120.63
5.6.290.0130.06320.69
5.6.280.0120.06420.77
5.6.270.0220.06520.77
5.6.260.0230.07220.95
5.6.250.0120.06220.93
5.6.240.0160.06020.92
5.6.230.0170.08420.73
5.6.220.0120.07020.80
5.6.210.0150.06520.79
5.6.200.0090.05019.50
5.6.190.0110.07320.69
5.6.180.0230.06620.73
5.6.170.0260.07420.61
5.6.160.0110.06720.54
5.6.150.0150.06619.53
5.6.140.0120.07019.49
5.6.130.0140.07419.57
5.6.120.0140.05520.92
5.6.110.0190.06220.96
5.6.100.0110.07520.83
5.6.90.0080.07220.81
5.6.80.0130.04520.36
5.6.70.0180.06320.31
5.6.60.0110.06320.09
5.6.50.0190.05920.10
5.6.40.0210.06320.06
5.6.30.0160.05520.07
5.6.20.0170.06020.07
5.6.10.0170.05220.06
5.6.00.0140.05520.12
5.5.380.0180.07617.56
5.5.370.0180.07217.43
5.5.360.0180.05817.44
5.5.350.0210.05918.93
5.5.340.0120.06217.88
5.5.330.0170.04619.21
5.5.320.0180.06319.17
5.5.310.0210.04919.17
5.5.300.0150.06418.03
5.5.290.0090.04817.94
5.5.280.0110.06619.49
5.5.270.0110.07119.44
5.5.260.0080.06219.43
5.5.250.0110.05419.27
5.5.240.0110.04418.73
5.5.230.0140.05317.41
5.5.220.0080.05717.12
5.5.210.0110.05617.16
5.5.200.0130.05417.17
5.5.190.0110.05717.41
5.5.180.0180.04917.13
5.5.160.0130.05217.10
5.5.150.0120.05217.37
5.5.140.0080.05717.38
5.5.130.0150.05117.14
5.5.120.0140.05017.46
5.5.110.0130.05917.34
5.5.100.0100.05617.27
5.5.90.0180.04617.25
5.5.80.0120.05417.28
5.5.70.0110.05517.36
5.5.60.0140.05117.29
5.5.50.0170.04917.29
5.5.40.0130.05017.35
5.5.30.0110.05416.95
5.5.20.0140.05317.27
5.5.10.0080.05617.02
5.5.00.0110.05517.19
5.4.450.0350.05619.36
5.4.440.0580.05719.46
5.4.430.0500.05919.54
5.4.420.0460.05619.44
5.4.410.0500.05419.29
5.4.400.0160.05518.83
5.4.390.0190.05618.78
5.4.380.0140.05718.83
5.4.370.0200.05918.91
5.4.360.0090.06318.94
5.4.350.0160.05319.03
5.4.340.0140.05518.91
5.4.320.0240.05118.85
5.4.310.0140.05518.79
5.4.300.0190.04818.80
5.4.290.0140.05518.82
5.4.280.0200.05918.89
5.4.270.0160.05418.74
5.4.260.0180.05018.80
5.4.250.0270.04618.86
5.4.240.0270.04618.83
5.4.230.0170.05618.86
5.4.220.0140.05718.93
5.4.210.0200.05418.73
5.4.200.0180.05217.87
5.4.190.0150.05518.83
5.4.180.0240.04418.75
5.4.170.0130.06218.95
5.4.160.0150.05218.96
5.4.150.0180.05618.83
5.4.140.0200.04816.46
5.4.130.0160.04916.47
5.4.120.0170.06016.49
5.4.110.0220.06616.41
5.4.100.0170.05116.44
5.4.90.0120.05316.45
5.4.80.0200.04316.45
5.4.70.0180.05716.40
5.4.60.0200.04916.41
5.4.50.0180.04616.43
5.4.40.0140.05016.40
5.4.30.0240.04216.40
5.4.20.0190.05016.49
5.4.10.0190.05016.44
5.4.00.0170.04815.77
5.3.290.0230.05814.74
5.3.280.0180.04914.61
5.3.270.0140.05414.71
5.3.260.0180.05014.77
5.3.250.0150.05114.83
5.3.240.0130.05914.80
5.3.230.0120.06514.67
5.3.220.0180.05414.67
5.3.210.0170.05614.76
5.3.200.0150.05014.71
5.3.190.0240.05514.75
5.3.180.0150.05414.67
5.3.170.0180.05014.63
5.3.160.0180.05014.67
5.3.150.0160.05114.52
5.3.140.0120.05514.63
5.3.130.0150.05614.72
5.3.120.0170.05314.75
5.3.110.0200.04914.74
5.3.100.0150.05714.25
5.3.90.0220.05414.09
5.3.80.0160.05614.16
5.3.70.0160.05114.27
5.3.60.0160.05014.17
5.3.50.0170.04813.94
5.3.40.0190.04914.05
5.3.30.0250.04414.10
5.3.20.0190.04913.85
5.3.10.0190.05713.64
5.3.00.0170.04813.84
5.2.170.0230.03811.13
5.2.160.0070.04711.30
5.2.150.0070.04711.26
5.2.140.0120.04211.33
5.2.130.0080.04411.28
5.2.120.0160.03711.29
5.2.110.0110.04211.05
5.2.100.0220.04311.21
5.2.90.0120.04011.20
5.2.80.0110.04111.24
5.2.70.0110.04311.30
5.2.60.0060.04811.14
5.2.50.0130.04111.13
5.2.40.0080.04211.15
5.2.30.0160.03811.09
5.2.20.0150.03911.00
5.2.10.0120.04211.01
5.2.00.0120.04010.83
5.1.60.0100.03410.20
5.1.50.0110.03310.16
5.1.40.0070.03710.02
5.1.30.0090.03810.47
5.1.20.0160.03410.44
5.1.10.0160.03110.30
5.1.00.0070.03810.20
5.0.50.0080.0268.75
5.0.40.0060.0298.62
5.0.30.0080.0488.34
5.0.20.0090.0278.33
5.0.10.0060.0298.37
5.0.00.0060.0428.36
4.4.90.0060.0217.19
4.4.80.0070.0217.16
4.4.70.0050.0227.16
4.4.60.0070.0197.16
4.4.50.0040.0227.20
4.4.40.0060.0407.23
4.4.30.0060.0227.18
4.4.20.0080.0217.20
4.4.10.0090.0197.21
4.4.00.0070.0327.24
4.3.110.0080.0227.14
4.3.100.0060.0217.19
4.3.90.0050.0217.13
4.3.80.0030.0357.14
4.3.70.0110.0207.13
4.3.60.0050.0227.14
4.3.50.0090.0207.11
4.3.40.0130.0267.10
4.3.30.0050.0216.56
4.3.20.0020.0256.49
4.3.10.0070.0196.49
4.3.00.0060.0217.70

preferences:
58.01 ms | 400 KiB | 5 Q