3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function getStatic() { return get_class(new static); } public function getCalledClass() { return get_called_class(); } public static function sGetStatic() { return get_class(new static); } public static function sGetCalledClass() { return get_called_class(); } } class B extends A { public function pGetStatic() { return parent::getStatic(); } public function pGetCalledClass() { return parent::getCalledClass(); } public static function psGetStatic() { return parent::sGetStatic(); } public static function psGetCalledClass() { return parent::sGetCalledClass(); } } $b = new B; var_dump($b->getStatic()); $b = new B; var_dump($b->getCalledClass()); var_dump(B::sGetStatic()); var_dump(B::sGetCalledClass()); $b = new B; var_dump($b->pGetStatic()); $b = new B; var_dump($b->pGetCalledClass()); var_dump(B::psGetStatic()); var_dump(B::psGetCalledClass());

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.0090.00616.63
8.3.50.0130.00422.05
8.3.40.0140.00718.70
8.3.30.0060.00918.98
8.3.20.0040.00420.21
8.3.10.0030.00623.66
8.3.00.0090.00020.41
8.2.180.0160.00618.16
8.2.170.0070.00722.96
8.2.160.0100.00320.38
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00022.05
8.2.110.0030.00622.08
8.2.100.0090.00317.72
8.2.90.0000.00819.08
8.2.80.0080.00017.97
8.2.70.0000.00817.50
8.2.60.0000.00817.80
8.2.50.0030.00618.07
8.2.40.0040.00418.22
8.2.30.0070.00018.01
8.2.20.0040.00417.60
8.2.10.0040.00417.71
8.2.00.0030.00517.54
8.1.280.0120.00625.92
8.1.270.0080.00023.83
8.1.260.0030.00626.35
8.1.250.0000.00728.09
8.1.240.0060.00323.96
8.1.230.0000.01219.06
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0030.00617.23
8.1.190.0040.00417.43
8.1.180.0030.00618.10
8.1.170.0080.00418.45
8.1.160.0040.00421.89
8.1.150.0040.00418.58
8.1.140.0020.00517.40
8.1.130.0070.00017.83
8.1.120.0040.00417.33
8.1.110.0000.00817.39
8.1.100.0070.00017.31
8.1.90.0000.00817.38
8.1.80.0070.00017.41
8.1.70.0040.00417.33
8.1.60.0000.00817.56
8.1.50.0000.01017.56
8.1.40.0070.00017.41
8.1.30.0000.00917.64
8.1.20.0060.00317.55
8.1.10.0000.00717.50
8.1.00.0040.00417.43
8.0.300.0040.00418.77
8.0.290.0070.00016.93
8.0.280.0000.00718.25
8.0.270.0000.00717.21
8.0.260.0050.00316.68
8.0.250.0030.00316.96
8.0.240.0030.00316.92
8.0.230.0030.00316.92
8.0.220.0020.00516.86
8.0.210.0030.00616.91
8.0.200.0000.00616.88
8.0.190.0000.00716.82
8.0.180.0000.00716.89
8.0.170.0040.00416.76
8.0.160.0050.00216.69
8.0.150.0070.00016.76
8.0.140.0050.00216.84
8.0.130.0000.00513.26
8.0.120.0000.00716.84
8.0.110.0050.00216.89
8.0.100.0040.00416.86
8.0.90.0050.00316.88
8.0.80.0110.01016.88
8.0.70.0080.00016.73
8.0.60.0040.00416.88
8.0.50.0000.00816.65
8.0.30.0050.01417.04
8.0.20.0050.01317.40
8.0.10.0030.00316.87
8.0.00.0140.00616.64
7.4.330.0000.00515.00
7.4.320.0060.00016.35
7.4.300.0000.00616.47
7.4.290.0040.00416.46
7.4.280.0040.00716.61
7.4.270.0040.00416.55
7.4.260.0030.00316.60
7.4.250.0060.00316.50
7.4.240.0050.00216.50
7.4.230.0030.00316.64
7.4.220.0070.01016.59
7.4.210.0060.01116.55
7.4.200.0000.00816.45
7.4.190.0040.00416.48
7.4.160.0100.01016.63
7.4.150.0090.00917.40
7.4.140.0140.00517.86
7.4.130.0070.01016.55
7.4.120.0150.00816.41
7.4.110.0040.01216.57
7.4.100.0110.00716.43
7.4.90.0110.00716.39
7.4.80.0070.01516.31
7.4.70.0120.00616.47
7.4.60.0090.01116.29
7.4.50.0000.00716.53
7.4.40.0090.00622.77
7.4.30.0130.00316.43
7.4.00.0030.01014.81
7.3.330.0020.00213.32
7.3.320.0050.00013.05
7.3.310.0050.00216.11
7.3.300.0030.00316.20
7.3.290.0120.00816.25
7.3.280.0090.00716.22
7.3.270.0160.00017.40
7.3.260.0120.00616.43
7.3.250.0130.00716.28
7.3.240.0090.00916.27
7.3.230.0110.00516.51
7.3.210.0000.01716.26
7.3.200.0080.01119.39
7.3.190.0060.01116.16
7.3.180.0030.01216.25
7.3.170.0030.01316.27
7.3.160.0000.01616.44
7.3.120.0030.01214.44
7.2.330.0120.01216.61
7.2.320.0060.01316.43
7.2.310.0060.01616.79
7.2.300.0030.01216.70
7.2.290.0060.01116.77
7.2.60.0030.01016.77
7.2.00.0100.01019.00
7.1.200.0080.00315.63
7.1.100.0070.00417.93
7.1.70.0000.01016.86
7.1.60.0070.01719.29
7.1.50.0070.01817.02
7.1.00.0030.07722.43
7.0.200.0040.00416.79
7.0.140.0000.07722.18
7.0.60.0130.07020.00
7.0.50.0000.04017.90
7.0.40.0070.05320.18
7.0.30.0200.04020.33
7.0.20.0230.04020.24
7.0.10.0270.04720.07
7.0.00.0030.05320.09
5.6.280.0070.07021.11
5.6.210.0030.08320.68
5.6.200.0030.05018.15
5.6.190.0170.04720.47
5.6.180.0070.07720.39
5.6.170.0270.07720.52
5.6.160.0170.07320.39
5.6.150.0030.08318.17
5.6.140.0070.08018.18
5.6.130.0070.03718.13
5.6.120.0100.04021.05
5.6.110.0100.04021.00
5.6.100.0070.06720.89
5.6.90.0170.07720.99
5.6.80.0130.07720.52
5.6.70.3700.03320.37
5.5.350.0100.07020.35
5.5.340.0170.06017.99
5.5.330.0100.08020.14
5.5.320.0000.05320.36
5.5.310.0170.04320.36
5.5.300.0100.07717.95
5.5.290.0000.04317.93
5.5.280.0130.07320.96
5.5.270.0200.07320.88
5.5.260.0030.07020.80
5.5.250.0130.08020.71
5.5.240.0030.08320.09
5.4.450.1170.03719.20
5.4.440.0900.06019.62
5.4.430.0200.05319.55
5.4.420.0600.05319.33
5.4.410.0830.06319.56
5.4.400.0800.05719.30
5.4.390.0900.08319.26
5.4.380.0170.05318.54
5.4.370.0100.05718.78
5.4.360.0070.05718.78
5.4.350.0170.05018.58
5.4.340.0100.06318.75
5.4.320.0070.03812.51
5.4.310.0080.04512.51
5.4.300.0080.03412.51
5.4.290.0050.03912.50
5.4.280.0050.03712.41
5.4.270.0080.04412.40
5.4.260.0050.04412.41
5.4.250.0050.04012.39
5.4.240.0070.03512.39
5.4.230.0070.03612.39
5.4.220.0070.03812.38
5.4.210.0050.03612.39
5.4.200.0050.03912.39
5.4.190.0110.04612.38
5.4.180.0070.05012.38
5.4.170.0080.03612.39
5.4.160.0040.03912.39
5.4.150.0050.03812.38
5.4.140.0040.04112.06
5.4.130.0050.03712.05
5.4.120.0070.03412.00
5.4.110.0080.04512.00
5.4.100.0070.04712.00
5.4.90.0030.05412.01
5.4.80.0070.04312.00
5.4.70.0040.03612.00
5.4.60.0050.03512.00
5.4.50.0070.03512.00
5.4.40.0070.03511.99
5.4.30.0060.03811.99
5.4.20.0040.03911.99
5.4.10.0020.03811.98
5.4.00.0090.03411.47
5.3.290.0070.04412.80
5.3.280.0090.03612.71
5.3.270.0040.04212.72
5.3.260.0070.03812.72
5.3.250.0060.03712.72
5.3.240.0060.03812.72
5.3.230.0050.03812.71
5.3.220.0090.03412.68
5.3.210.0050.04012.68
5.3.200.0040.03812.68
5.3.190.0040.04012.68
5.3.180.0030.04012.67
5.3.170.0060.03712.67
5.3.160.0030.05212.67
5.3.150.0100.04912.67
5.3.140.0090.04312.66
5.3.130.0080.04712.66
5.3.120.0060.04112.66
5.3.110.0080.03812.66
5.3.100.0070.03712.13
5.3.90.0100.03412.11
5.3.80.0060.04112.09
5.3.70.0060.04012.09
5.3.60.0050.04912.07
5.3.50.0080.03612.02
5.3.40.0070.03812.03
5.3.30.0040.03911.99
5.3.20.0090.03511.77
5.3.10.0060.03911.73
5.3.00.0060.03811.71
5.2.170.0070.0339.21
5.2.160.0050.0319.21
5.2.150.0040.0329.21
5.2.140.0080.0349.21
5.2.130.0060.0339.16
5.2.120.0050.0319.17
5.2.110.0050.0309.18
5.2.100.0020.0319.18
5.2.90.0030.0319.17
5.2.80.0060.0309.17
5.2.70.0020.0349.17
5.2.60.0060.0299.12
5.2.50.0050.0319.09
5.2.40.0060.0369.07
5.2.30.0040.0359.04
5.2.20.0060.0349.04
5.2.10.0060.0288.94
5.2.00.0060.0328.80
5.1.60.0090.0298.08
5.1.50.0080.0298.08
5.1.40.0040.0298.07
5.1.30.0030.0308.41
5.1.20.0080.0248.44
5.1.10.0030.0288.15
5.1.00.0030.0308.16
5.0.50.0040.0256.64
5.0.40.0070.0216.50
5.0.30.0030.0326.32
5.0.20.0020.0216.28
5.0.10.0040.0196.25
5.0.00.0040.0316.25
4.4.90.0010.0174.78
4.4.80.0000.0184.75
4.4.70.0040.0174.76
4.4.60.0060.0134.76
4.4.50.0020.0234.77
4.4.40.0010.0264.71
4.4.30.0000.0184.76
4.4.20.0000.0194.85
4.4.10.0030.0154.85
4.4.00.0040.0234.76
4.3.110.0030.0164.66
4.3.100.0050.0134.66
4.3.90.0030.0154.63
4.3.80.0020.0304.58
4.3.70.0010.0164.63
4.3.60.0010.0164.63
4.3.50.0040.0154.63
4.3.40.0010.0264.53
4.3.30.0000.0223.29
4.3.20.0010.0183.27
4.3.10.0020.0203.23
4.3.00.0100.02013.14

preferences:
46.74 ms | 401 KiB | 5 Q