3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function m() { return $this->n(); } private function n() { static $x; if ($x === null) { $x = get_class($this); } return $x; } } class B extends A { } $a = new A(); $b = new B(); echo $a->m()."\n"; echo $b->m()."\n";

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.130.0090.00618.40
8.3.120.0040.00419.00
8.3.110.0150.00020.94
8.3.100.0090.00624.06
8.3.90.0040.01126.77
8.3.80.0050.00516.50
8.3.70.0110.00416.58
8.3.60.0160.00016.63
8.3.50.0110.01116.55
8.3.40.0150.00018.68
8.3.30.0040.01118.35
8.3.20.0070.00024.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.250.0040.00418.42
8.2.240.0030.00518.90
8.2.230.0050.00222.58
8.2.220.0060.00337.54
8.2.210.0100.00026.77
8.2.200.0100.00016.75
8.2.190.0140.00716.58
8.2.180.0150.00325.92
8.2.170.0070.00719.01
8.2.160.0040.01122.96
8.2.150.0070.00025.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0030.00526.35
8.2.110.0090.00019.35
8.2.100.0080.00417.74
8.2.90.0030.00617.75
8.2.80.0040.00417.97
8.2.70.0030.00517.50
8.2.60.0040.00418.22
8.2.50.0050.00318.10
8.2.40.0050.00321.02
8.2.30.0040.00419.14
8.2.20.0080.00018.13
8.2.10.0050.00219.20
8.2.00.0050.00219.24
8.1.300.0040.00418.23
8.1.290.0030.00630.84
8.1.280.0070.00725.92
8.1.270.0000.00823.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0040.00419.46
8.1.230.0090.00719.00
8.1.220.0030.00717.76
8.1.210.0040.00418.77
8.1.200.0030.00717.00
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0040.00418.64
8.1.160.0040.00418.86
8.1.150.0000.00718.81
8.1.140.0000.00718.84
8.1.130.0030.00617.41
8.1.120.0000.00717.46
8.1.110.0000.00817.36
8.1.100.0000.00717.34
8.1.90.0050.00317.50
8.1.80.0000.00817.38
8.1.70.0040.00417.39
8.1.60.0060.00317.62
8.1.50.0040.00417.54
8.1.40.0050.00317.41
8.1.30.0030.00517.66
8.1.20.0090.00017.55
8.1.10.0000.00717.43
8.1.00.0020.00517.52
8.0.300.0040.00419.64
8.0.290.0030.00616.63
8.0.280.0030.00318.51
8.0.270.0070.00016.74
8.0.260.0030.00316.80
8.0.250.0000.00816.97
8.0.240.0070.00016.95
8.0.230.0030.00316.96
8.0.220.0000.00716.77
8.0.210.0030.00316.92
8.0.200.0030.00317.00
8.0.190.0040.00416.91
8.0.180.0040.00416.93
8.0.170.0080.00016.97
8.0.160.0040.00416.82
8.0.150.0040.00416.71
8.0.140.0030.00616.92
8.0.130.0000.00613.24
8.0.120.0030.00516.80
8.0.110.0060.00316.78
8.0.100.0000.00716.70
8.0.90.0030.00516.85
8.0.80.0080.01016.88
8.0.70.0040.00416.72
8.0.60.0040.00417.02
8.0.50.0070.00016.79
8.0.30.0090.00616.85
8.0.20.0080.00916.87
8.0.10.0080.00817.05
8.0.00.0070.01016.95
7.4.330.0000.00515.55
7.4.320.0030.00316.59
7.4.300.0000.00716.52
7.4.290.0000.00716.58
7.4.280.0040.00416.45
7.4.270.0070.00016.48
7.4.260.0030.00313.28
7.4.250.0040.00416.34
7.4.240.0000.00716.60
7.4.230.0000.00716.50
7.4.220.0020.00516.37
7.4.210.0060.01016.56
7.4.200.0040.00416.51
7.4.160.0130.00916.77
7.4.150.0070.01016.63
7.4.140.0050.01016.57
7.4.130.0070.01016.42
7.4.120.0100.01016.36
7.4.110.0120.00316.34
7.4.100.0110.00616.61
7.4.90.0070.01016.38
7.4.80.0090.00616.36
7.4.70.0110.00816.61
7.4.60.0090.01116.51
7.4.50.0130.00516.43
7.4.40.0090.00616.44
7.4.30.0080.01116.41
7.4.20.0110.00816.45
7.4.10.0070.01116.52
7.4.00.0080.00816.61
7.3.330.0030.00316.21
7.3.320.0000.00513.18
7.3.310.0030.00316.39
7.3.300.0000.00616.20
7.3.290.0060.01016.38
7.3.270.0110.00516.27
7.3.260.0030.01616.38
7.3.250.0100.00916.34
7.3.240.0050.01016.34
7.3.230.0090.00616.31
7.3.220.0150.00016.29
7.3.210.0060.01116.20
7.3.200.0090.00616.31
7.3.190.0090.01216.32
7.3.180.0100.01016.31
7.3.170.0080.00816.31
7.3.160.0080.00816.38
7.3.150.0040.01116.23
7.3.140.0080.00816.27
7.3.130.0060.01216.31
7.3.120.0170.00416.30
7.3.110.0070.01516.20
7.3.100.0100.01016.30
7.3.90.0120.00616.52
7.3.80.0080.00816.29
7.3.70.0050.00816.32
7.3.60.0120.00816.46
7.3.50.0110.00816.42
7.3.40.0150.00516.45
7.3.30.0090.00816.41
7.3.20.0040.01218.23
7.3.10.0120.00618.23
7.3.00.0090.01018.21
7.2.340.0140.00916.32
7.2.330.0200.00516.33
7.2.320.0180.00516.33
7.2.310.0210.00416.33
7.2.300.0120.01216.27
7.2.290.0210.00916.29
7.2.280.0190.00916.36
7.2.270.0080.02216.35
7.2.260.0200.00716.34
7.2.250.0200.00416.26
7.2.240.0170.00716.28
7.2.230.0150.01516.29
7.2.220.0260.00416.34
7.2.210.0190.00516.32
7.2.200.0210.01016.55
7.2.190.0280.00416.50
7.2.180.0200.01216.48
7.2.170.0280.00616.51
7.2.160.0230.00416.59
7.2.150.0110.01518.46
7.2.140.0120.01218.41
7.2.130.0200.00318.53
7.2.120.0180.00818.49
7.2.110.0220.00318.52
7.2.100.0180.00618.52
7.2.90.0120.01218.39
7.2.80.0160.00818.37
7.2.70.0220.00918.41
7.2.60.0220.00618.41
7.2.50.0160.01618.30
7.2.40.0170.01218.43
7.2.30.0120.01218.54
7.2.20.0150.01018.46
7.2.10.0230.00618.46
7.2.00.0130.01318.55
7.1.330.0210.00317.21
7.1.320.0100.01717.37
7.1.310.0110.01417.32
7.1.300.0170.01017.42
7.1.290.0200.00817.45
7.1.280.0110.01417.45
7.1.270.0190.00317.47
7.1.260.0160.00717.33
7.1.250.0080.01317.33
7.1.240.0110.01117.21
7.1.230.0120.00917.39
7.1.220.0120.00917.32
7.1.210.0080.01317.41
7.1.200.0150.00817.37
7.1.190.0220.00617.36
7.1.180.0170.00817.31
7.1.170.0160.00817.36
7.1.160.0250.00317.35
7.1.150.0150.00717.33
7.1.140.0160.00817.32
7.1.130.0200.00617.27
7.1.120.0160.00817.30
7.1.110.0280.00017.30
7.1.100.0120.01517.31
7.1.90.0150.01017.35
7.1.80.0180.00917.33
7.1.70.0190.00317.19
7.1.60.0300.01917.40
7.1.50.0300.00617.37
7.1.40.0210.00917.54
7.1.30.0190.00817.48
7.1.20.0120.02217.25
7.1.10.0130.01017.31
7.1.00.0160.00617.27
7.0.330.0120.00816.99
7.0.320.0170.00316.92
7.0.310.0150.00617.04
7.0.300.0120.00817.02
7.0.290.0130.00816.94
7.0.280.0140.00916.93
7.0.270.0220.00816.99
7.0.260.0130.01316.86
7.0.250.0190.00417.18
7.0.240.0160.00817.17
7.0.230.0180.00917.06
7.0.220.0210.00617.02
7.0.210.0170.00417.11
7.0.200.0160.01717.08
7.0.190.0210.00717.15
7.0.180.0210.00816.95
7.0.170.0180.01117.05
7.0.160.0150.00717.03
7.0.150.0210.00716.99
7.0.140.0340.00016.93
7.0.130.0140.00617.10
7.0.120.0160.00317.11
7.0.110.0190.00317.07
7.0.100.0150.00516.94
7.0.90.0080.01116.94
7.0.80.0170.00515.00
7.0.70.0150.00715.14
7.0.60.0210.01015.08
7.0.50.0150.00915.06
7.0.40.0130.00715.29
7.0.30.0070.01415.23
7.0.20.0200.00815.17
7.0.10.0690.00615.32
7.0.00.0200.00015.18
5.6.400.0200.00715.71
5.6.390.0140.01415.79
5.6.380.0140.00715.77
5.6.370.0130.01615.69
5.6.360.0160.00815.82
5.6.350.0130.01015.98
5.6.340.0150.01115.84
5.6.330.0200.00515.86
5.6.320.0220.00515.89
5.6.310.0240.01915.86
5.6.300.0220.00915.75
5.6.290.0160.00815.85
5.6.280.0140.00715.88
5.6.270.0180.00415.79
5.6.260.0140.02715.86
5.6.250.0160.00815.97
5.6.240.0130.00915.88
5.6.230.0110.01115.98
5.6.220.0260.00315.96
5.6.210.0210.00915.84
5.6.200.0120.01215.99
5.6.190.0170.00616.19
5.6.180.0160.00515.88
5.6.170.0150.00915.97
5.6.160.0170.00615.98
5.6.150.0110.01115.89
5.6.140.0190.00315.91
5.6.130.0210.01415.87
5.6.120.0150.01515.94
5.6.110.0140.00715.89
5.6.100.0060.01615.75
5.6.90.0160.00515.77
5.6.80.0140.00615.84
5.6.70.0120.00815.83
5.6.60.0130.00915.88
5.6.50.0110.01115.81
5.6.40.0110.01115.84
5.6.30.0180.00615.77
5.6.20.0120.00915.84
5.6.10.0140.00915.66
5.6.00.0090.01315.80
5.5.380.0120.00915.92
5.5.370.0110.01115.98
5.5.360.0180.01115.73
5.5.350.0150.00615.73
5.5.340.0140.00715.82
5.5.330.0160.00615.90
5.5.320.0130.01015.72
5.5.310.0150.00715.74
5.5.300.0140.00815.72
5.5.290.0160.01015.73
5.5.280.0130.00915.73
5.5.270.0110.01115.76
5.5.260.0060.01515.86
5.5.250.0110.01115.89
5.5.240.0170.00415.79
5.5.230.0120.00815.85
5.5.220.0120.00815.80
5.5.210.0150.00615.85
5.5.200.0130.01015.80
5.5.190.0110.01115.70
5.5.180.0060.01615.77
5.5.170.0130.01015.69
5.5.160.0140.00715.69
5.5.150.0050.01715.63
5.5.140.0110.01115.64
5.5.130.0090.01315.59
5.5.120.0230.00015.54
5.5.110.0160.00615.77
5.5.100.0130.00915.88
5.5.90.0190.00415.82
5.5.80.0150.00615.85
5.5.70.0130.00915.84
5.5.60.0180.00815.88
5.5.50.0150.00815.84
5.5.40.0180.00615.70
5.5.30.0120.01215.73
5.5.20.0160.00515.88
5.5.10.0140.00815.73
5.5.00.0110.01115.81
5.4.450.0080.01212.71
5.4.440.0090.00912.78
5.4.430.0140.00612.69
5.4.420.0050.01012.70
5.4.410.0100.00612.75
5.4.400.0100.00612.63
5.4.390.0090.00712.70
5.4.380.0100.01012.82
5.4.370.0100.01012.72
5.4.360.0080.01212.66
5.4.350.0000.01812.72
5.4.340.0110.00712.63
5.4.330.0120.00712.71
5.4.320.0110.00612.81
5.4.310.0170.00012.68
5.4.300.0070.01012.79
5.4.290.0070.01112.79
5.4.280.0170.00412.75
5.4.270.0170.00012.70
5.4.260.0130.00412.66
5.4.250.0130.00412.71
5.4.240.0130.00312.63
5.4.230.0140.00912.45
5.4.220.0130.00312.44
5.4.210.0150.00412.43
5.4.200.0100.01012.54
5.4.190.0140.00712.56
5.4.180.0080.00812.53
5.4.170.0110.00712.69
5.4.160.0130.00612.58
5.4.150.0120.00912.49
5.4.140.0130.00812.72
5.4.130.0170.00312.72
5.4.120.0130.00612.71
5.4.110.0080.00812.71
5.4.100.0120.00412.66
5.4.90.0130.00412.73
5.4.80.0130.00312.76
5.4.70.0130.00312.70
5.4.60.0190.00412.77
5.4.50.0140.00312.64
5.4.40.0090.00912.71
5.4.30.0130.00312.67
5.4.20.0140.00312.76
5.4.10.0100.00712.67
5.4.00.0090.00912.52
5.3.290.0120.00613.10
5.3.280.0040.01213.01
5.3.270.0100.00813.18
5.3.260.0160.01613.17
5.3.250.0120.00913.09
5.3.240.0140.00712.95
5.3.230.0140.00712.96
5.3.220.0180.00012.89
5.3.210.0090.00913.13
5.3.200.0140.00313.13
5.3.190.0100.00813.07
5.3.180.0100.00713.09
5.3.170.0080.01213.03
5.3.160.0100.01013.16
5.3.150.0110.00813.16
5.3.140.0110.00712.97
5.3.130.0100.01013.13
5.3.120.0140.00713.10
5.3.110.0080.01012.96
5.3.100.0090.00912.96
5.3.90.0070.01113.00
5.3.80.0100.01012.83
5.3.70.0130.01012.85
5.3.60.0110.00813.09
5.3.50.0120.00612.92
5.3.40.0110.01113.16
5.3.30.0090.01013.03
5.3.20.0130.00713.07
5.3.10.0110.00912.79
5.3.00.0090.00912.86
5.2.170.0070.00712.18
5.2.160.0040.01212.21
5.2.150.0120.00412.10
5.2.140.0140.00612.10
5.2.130.0120.00911.86
5.2.120.0130.00312.04
5.2.110.0120.00411.90
5.2.100.0050.01111.95
5.2.90.0120.00811.86
5.2.80.0100.00711.81
5.2.70.0080.01111.79
5.2.60.0080.00811.73
5.2.50.0130.00611.85
5.2.40.0110.00412.03
5.2.30.0060.01011.90
5.2.20.0130.00711.83
5.2.10.0130.00311.70
5.2.00.0080.00811.70
5.1.60.0070.00710.96
5.1.50.0100.00311.10
5.1.40.0100.00211.07
5.1.30.0070.00711.33
5.1.20.0080.00811.15
5.1.10.0100.00311.13
5.1.00.0130.00010.93
5.0.50.0070.0049.98
5.0.40.0040.0089.88
5.0.30.0050.0059.83
5.0.20.0040.0079.87
5.0.10.0030.00710.00
5.0.00.0070.0049.96
4.4.90.0110.0008.97
4.4.80.0040.0048.97
4.4.70.0040.0028.97
4.4.60.0030.0038.97
4.4.50.0050.0028.97
4.4.40.0050.0038.97
4.4.30.0030.0038.97
4.4.20.0070.0008.97
4.4.10.0040.0048.97
4.4.00.0040.0048.97
4.3.110.0060.0008.97
4.3.100.0030.0058.97
4.3.90.0000.0088.97
4.3.80.0060.0008.97
4.3.70.0040.0048.97
4.3.60.0060.0038.97
4.3.50.0070.0008.97
4.3.40.0040.0028.97
4.3.30.0020.0028.97
4.3.20.0000.0058.97
4.3.10.0050.0008.97
4.3.00.0050.0008.97

preferences:
30.96 ms | 403 KiB | 5 Q