3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { const CONST_VALUE = 'A constant value'; } $classname = 'MyClass'; echo $classname::CONST_VALUE; // As of PHP 5.3.0 echo MyClass::CONST_VALUE; class OtherClass extends MyClass { public static $my_static = 'static var'; public static function doubleColon() { echo parent::CONST_VALUE . "\n"; echo self::$my_static . "\n"; } } $classname = 'OtherClass'; echo $classname::doubleColon(); // As of PHP 5.3.0 OtherClass::doubleColon(); ?>

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.0070.01116.75
8.3.50.0040.01121.94
8.3.40.0040.01118.57
8.3.30.0070.00718.92
8.3.20.0070.00020.00
8.3.10.0000.00923.66
8.3.00.0090.00919.07
8.2.180.0110.00318.23
8.2.170.0140.00722.96
8.2.160.0040.00920.55
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00726.16
8.2.120.0030.00619.68
8.2.110.0060.00321.03
8.2.100.0120.00017.72
8.2.90.0040.00420.60
8.2.80.0080.00017.97
8.2.70.0000.00917.63
8.2.60.0070.00017.93
8.2.50.0050.00418.07
8.2.40.0060.00319.83
8.2.30.0000.00718.24
8.2.20.0090.00017.55
8.2.10.0020.00518.04
8.2.00.0000.00817.61
8.1.280.0060.01625.92
8.1.270.0040.00423.65
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00322.21
8.1.230.0040.00820.98
8.1.220.0000.00817.74
8.1.210.0000.00818.95
8.1.200.0060.00317.25
8.1.190.0000.00817.35
8.1.180.0050.00518.10
8.1.170.0000.00818.58
8.1.160.0000.00721.94
8.1.150.0040.00418.50
8.1.140.0040.00417.36
8.1.130.0000.00717.81
8.1.120.0030.00517.38
8.1.110.0040.00417.35
8.1.100.0000.00717.36
8.1.90.0030.00517.52
8.1.80.0050.00217.41
8.1.70.0000.00717.38
8.1.60.0060.00317.57
8.1.50.0050.00317.32
8.1.40.0040.00417.48
8.1.30.0040.00417.67
8.1.20.0000.00717.59
8.1.10.0030.00617.57
8.1.00.0000.00817.38
8.0.300.0030.00620.16
8.0.290.0030.00317.15
8.0.280.0030.00518.44
8.0.270.0070.00017.15
8.0.260.0000.00717.29
8.0.250.0030.00316.92
8.0.240.0070.00017.01
8.0.230.0030.00316.90
8.0.220.0030.00316.80
8.0.210.0030.00316.77
8.0.200.0030.00316.96
8.0.190.0070.00016.92
8.0.180.0020.00516.94
8.0.170.0000.00916.92
8.0.160.0040.00416.90
8.0.150.0000.00816.94
8.0.140.0000.00716.74
8.0.130.0050.00013.28
8.0.120.0000.00816.87
8.0.110.0040.00416.92
8.0.100.0060.00316.86
8.0.90.0040.00416.93
8.0.80.0090.00616.76
8.0.70.0070.00016.85
8.0.60.0070.00016.76
8.0.50.0000.00816.76
8.0.30.0070.01317.07
8.0.20.0120.00717.40
8.0.10.0000.00717.05
8.0.00.0080.01216.72
7.4.330.0060.00015.14
7.4.320.0060.00016.55
7.4.300.0000.00616.61
7.4.290.0020.00516.59
7.4.280.0040.00416.62
7.4.270.0030.00316.63
7.4.260.0070.00016.47
7.4.250.0070.00016.55
7.4.240.0010.00616.43
7.4.230.0000.00716.23
7.4.220.0070.01016.56
7.4.210.0050.01016.53
7.4.200.0000.00716.34
7.4.190.0070.00016.68
7.4.160.0120.00416.65
7.4.150.0170.00317.40
7.4.140.0080.01017.86
7.4.130.0080.00916.47
7.4.120.0140.00616.51
7.4.110.0100.00716.31
7.4.100.0100.00916.45
7.4.90.0090.00916.54
7.4.80.0130.01019.39
7.4.70.0090.00616.47
7.4.60.0130.00316.54
7.4.50.0040.00416.56
7.4.40.0120.00316.50
7.4.30.0100.00616.43
7.4.00.0060.00915.10
7.3.330.0030.00313.15
7.3.320.0000.00513.32
7.3.310.0070.00016.38
7.3.300.0000.00716.32
7.3.290.0120.00416.36
7.3.280.0110.00716.33
7.3.270.0060.01117.40
7.3.260.0120.01116.67
7.3.250.0110.01116.46
7.3.240.0060.01016.28
7.3.230.0120.00416.39
7.3.210.0100.00716.51
7.3.200.0160.00619.39
7.3.190.0070.01016.45
7.3.180.0120.00316.27
7.3.170.0070.01016.46
7.3.160.0090.00616.60
7.3.120.0060.01214.58
7.2.330.0090.00916.68
7.2.320.0170.00316.71
7.2.310.0100.00916.70
7.2.300.0110.00716.41
7.2.290.0090.00916.43
7.2.00.0090.00619.34
7.1.100.0000.01117.99
7.1.70.0000.00716.95
7.1.60.0110.01419.46
7.1.50.0160.00916.90
7.1.00.0100.07322.45
7.0.200.0000.00816.70
7.0.140.0100.07022.08
7.0.60.0100.06020.01
7.0.50.0100.07317.84
7.0.40.0130.05320.40
7.0.30.0330.06720.20
7.0.20.0300.08020.26
7.0.10.0030.05720.25
7.0.00.0030.08720.07
5.6.280.0100.06720.90
5.6.210.0070.06020.53
5.6.200.0030.04318.16
5.6.190.0100.06720.46
5.6.180.0030.04320.55
5.6.170.0330.07020.47
5.6.160.0130.04020.47
5.6.150.0070.03718.25
5.6.140.0070.06318.18
5.6.130.0130.04718.12
5.6.120.0100.08021.10
5.6.110.0100.08021.04
5.6.100.0100.06720.97
5.6.90.0070.04320.98
5.6.80.0070.06720.41
5.5.350.0000.08320.35
5.5.340.0030.04017.95
5.5.330.0100.07720.27
5.5.320.0300.04320.24
5.5.310.0370.07720.32
5.5.300.0030.08318.08
5.5.290.0030.08017.93
5.5.280.0030.04720.88
5.5.270.0070.05320.75
5.5.260.0030.04020.89
5.5.250.0070.07720.68
5.5.240.0030.06720.19
5.4.450.0830.05319.56
5.4.440.0600.06019.63
5.4.430.1230.05319.64
5.4.420.1100.06019.64
5.4.410.0730.05719.25
5.4.400.1130.06019.22
5.4.390.0970.07718.89
5.4.380.0100.06018.53
5.4.370.0100.05718.80
5.4.360.0130.05718.77
5.4.350.0270.04018.53
5.4.340.0230.04318.63
5.4.320.0080.05212.50
5.4.310.0080.03612.50
5.4.300.0120.04412.50
5.4.290.0050.06812.50
5.4.280.0120.07312.39
5.4.270.0080.06712.40
5.4.260.0130.09412.39
5.4.250.0110.05512.39
5.4.240.0130.06812.39
5.4.230.0080.07012.38
5.4.220.0150.07512.38
5.4.210.0120.06612.39
5.4.200.0110.05512.39
5.4.190.0150.07812.38
5.4.180.0080.04812.38
5.4.170.0110.05312.39
5.4.160.0090.04912.39
5.4.150.0060.05312.39
5.4.140.0090.05512.07
5.4.130.0130.08612.06
5.4.120.0100.03712.02
5.4.110.0110.06712.01
5.4.100.0080.03912.01
5.4.90.0150.09212.01
5.4.80.0210.08212.01
5.4.70.0230.07012.01
5.4.60.0190.07412.01
5.4.50.0360.13612.01
5.4.40.0130.07412.00
5.4.30.0210.07611.99
5.4.20.0130.05911.99
5.4.10.0140.08312.00
5.4.00.0100.10011.48
5.3.290.0050.04012.80
5.3.280.0180.08412.71
5.3.270.0160.08912.72
5.3.260.0280.13012.72
5.3.250.0220.09112.72
5.3.240.0190.08112.72
5.3.230.0110.07312.71
5.3.220.0060.05712.68
5.3.210.0110.05412.68
5.3.200.0070.05612.68
5.3.190.0090.05112.68
5.3.180.0150.08812.67
5.3.170.0160.07412.67
5.3.160.0200.09212.67
5.3.150.0150.10512.68
5.3.140.0110.07112.66
5.3.130.0140.07612.65
5.3.120.0090.08612.66
5.3.110.0160.05812.65
5.3.100.0080.08812.12
5.3.90.0100.06812.11
5.3.80.0150.06912.09
5.3.70.0090.04912.09
5.3.60.0070.05212.08
5.3.50.0260.09212.02
5.3.40.0120.06112.02
5.3.30.0090.05211.98
5.3.20.0160.05411.77
5.3.10.0160.06611.73
5.3.00.0200.07411.71
5.2.170.0160.0889.22
5.2.160.0110.0539.21
5.2.150.0110.0619.21
5.2.140.0080.0479.21
5.2.130.0070.0499.17
5.2.120.0100.0529.17
5.2.110.0290.0889.18
5.2.100.0180.0539.18
5.2.90.0090.0589.17
5.2.80.0120.1039.17
5.2.70.0140.0739.16
5.2.60.0150.0589.13
5.2.50.0090.0589.10
5.2.40.0140.0689.07
5.2.30.0300.0839.04
5.2.20.0250.0909.04
5.2.10.0140.0648.94
5.2.00.0090.0998.81
5.1.60.0110.0438.09
5.1.50.0080.0468.08
5.1.40.0100.0688.07
5.1.30.0200.0708.41
5.1.20.0120.0648.44
5.1.10.0110.0668.16
5.1.00.0160.0618.16
5.0.50.0080.0196.64
5.0.40.0020.0236.50
5.0.30.0110.0496.30
5.0.20.0080.0306.28
5.0.10.0080.0206.25
5.0.00.0040.0326.25
4.4.90.0040.0264.78
4.4.80.0060.0174.75
4.4.70.0050.0164.76
4.4.60.0020.0184.75
4.4.50.0040.0164.77
4.4.40.0040.0304.70
4.4.30.0040.0394.76
4.4.20.0070.0704.84
4.4.10.0080.0254.85
4.4.00.0090.0384.76
4.3.110.0070.0274.67
4.3.100.0030.0224.66
4.3.90.0100.0284.63
4.3.80.0020.0334.58
4.3.70.0100.0214.63
4.3.60.0050.0194.63
4.3.50.0050.0214.63
4.3.40.0030.0344.53
4.3.30.0060.0363.30
4.3.20.0030.0213.28
4.3.10.0040.0203.24
4.3.00.0070.0237.27

preferences:
42.31 ms | 401 KiB | 5 Q