3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements Countable { public $prop1; private $propa=2; protected $propx=3; public function Greet() { return 'hello world'; } public function getCount() { $res = (array) $this; return count($res); } public function count() { return $this->getCount(); } } $t = new Test; echo $t->Greet(),"\n"; echo count( (array) $t),"\n"; echo $t->getCount(),"\n"; echo count($t),"\n"; var_dump( get_object_vars($t) );

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.40.0180.00418.93
8.3.30.0070.01018.89
8.3.20.0080.00020.24
8.3.10.0050.00323.51
8.3.00.0070.00317.38
8.2.170.0060.01222.96
8.2.160.0150.00320.35
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0080.00022.08
8.2.110.0040.00422.07
8.2.100.0070.00417.72
8.2.90.0000.00919.17
8.2.80.0040.00418.03
8.2.70.0030.00517.63
8.2.60.0030.00618.05
8.2.50.0000.00818.07
8.2.40.0090.00018.22
8.2.30.0040.00417.98
8.2.20.0040.00417.71
8.2.10.0040.00417.95
8.2.00.0070.00317.66
8.1.270.0030.00522.04
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00323.94
8.1.230.0090.00319.08
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0000.00917.13
8.1.190.0040.00417.55
8.1.180.0030.00518.10
8.1.170.0040.00418.65
8.1.160.0040.00421.96
8.1.150.0040.00418.68
8.1.140.0050.00317.41
8.1.130.0000.00717.75
8.1.120.0000.00717.29
8.1.110.0000.00917.33
8.1.100.0040.00417.38
8.1.90.0000.00817.45
8.1.80.0050.00217.40
8.1.70.0070.00017.45
8.1.60.0030.00617.53
8.1.50.0080.00017.46
8.1.40.0040.00417.37
8.1.30.0060.00317.59
8.1.20.0000.00817.67
8.1.10.0070.00017.62
8.1.00.0050.00317.38
8.0.300.0040.00418.77
8.0.290.0030.00317.18
8.0.280.0040.00418.38
8.0.270.0070.00017.16
8.0.260.0080.00017.25
8.0.250.0080.00016.98
8.0.240.0000.00917.00
8.0.230.0030.00616.83
8.0.220.0000.00716.77
8.0.210.0000.00716.90
8.0.200.0000.00716.87
8.0.190.0000.00716.97
8.0.180.0080.00016.89
8.0.170.0030.00616.95
8.0.160.0070.00016.88
8.0.150.0000.00816.85
8.0.140.0040.00416.83
8.0.130.0000.00713.27
8.0.120.0000.00816.85
8.0.110.0000.00716.91
8.0.100.0000.00716.72
8.0.90.0100.00016.92
8.0.80.0070.01516.85
8.0.70.0000.00716.79
8.0.60.0040.00416.75
8.0.50.0040.00416.83
8.0.30.0110.00817.10
8.0.20.0110.00817.40
8.0.10.0040.00416.88
8.0.00.0060.01216.84
7.4.330.0030.00315.00
7.4.320.0000.00816.62
7.4.300.0030.00316.50
7.4.290.0000.00716.48
7.4.280.0040.00416.45
7.4.270.0070.00016.41
7.4.260.0000.00716.48
7.4.250.0040.00416.38
7.4.240.0020.00516.43
7.4.230.0000.00616.32
7.4.220.0110.00716.50
7.4.210.0130.00816.59
7.4.200.0030.00316.33
7.4.190.0000.00716.73
7.4.160.0130.00316.53
7.4.150.0070.01317.40
7.4.140.0060.01117.86
7.4.130.0100.00816.63
7.4.120.0090.00716.50
7.4.110.0120.00916.35
7.4.100.0140.00316.48
7.4.90.0090.00916.49
7.4.80.0070.01019.39
7.4.70.0050.01316.48
7.4.60.0060.01016.52
7.4.50.0080.00016.27
7.4.40.0080.00422.77
7.4.30.0130.00316.40
7.4.00.0080.00414.98
7.3.330.0000.00513.16
7.3.320.0050.00013.20
7.3.310.0040.00416.16
7.3.300.0060.00016.14
7.3.290.0090.01016.36
7.3.280.0110.00416.30
7.3.270.0090.00917.40
7.3.260.0170.00716.46
7.3.250.0090.01016.49
7.3.240.0100.00616.33
7.3.230.0060.00916.39
7.3.210.0130.00316.37
7.3.200.0030.01319.39
7.3.190.0100.00716.38
7.3.180.0070.01116.54
7.3.170.0040.01116.55
7.3.160.0130.00316.48
7.3.120.0100.00714.80
7.3.110.0070.00714.66
7.3.100.0030.01014.44
7.3.90.0070.00714.92
7.3.80.0000.01714.53
7.3.70.0030.01014.75
7.3.60.0000.01114.55
7.3.50.0150.00014.87
7.3.40.0080.00314.36
7.3.30.0110.00414.81
7.3.20.0030.01316.62
7.3.10.0090.00316.53
7.3.00.0080.00416.73
7.2.330.0120.00916.68
7.2.320.0150.00316.75
7.2.310.0140.00316.56
7.2.300.0120.00616.66
7.2.290.0030.01316.56
7.2.240.0090.00615.03
7.2.230.0000.01015.16
7.2.220.0030.00915.05
7.2.210.0040.01115.10
7.2.200.0030.01014.95
7.2.190.0060.01014.98
7.2.180.0060.00614.79
7.2.170.0070.01015.10
7.2.160.0090.00614.95
7.2.150.0090.00617.08
7.2.140.0070.00716.61
7.2.130.0070.00716.93
7.2.120.0060.00616.64
7.2.110.0000.01316.70
7.2.100.0100.00717.03
7.2.90.0040.01517.07
7.2.80.0070.00716.90
7.2.70.0060.00616.77
7.2.60.0480.01115.93
7.2.50.0030.01516.73
7.2.40.0070.01016.73
7.2.30.0030.00916.89
7.2.20.0070.01117.04
7.2.10.0070.00716.92
7.2.00.0070.00717.97
7.1.330.0120.00315.77
7.1.320.0040.01115.68
7.1.310.0050.00815.87
7.1.300.0100.00315.40
7.1.290.0070.00715.66
7.1.280.0070.01015.55
7.1.270.0070.00715.57
7.1.260.0000.01415.64
7.1.250.0040.01215.59
7.1.200.0060.00315.64
7.1.100.0030.01318.01
7.1.70.0000.00716.95
7.1.60.0090.01619.33
7.1.50.0190.01634.81
7.1.00.0100.07022.54
7.0.200.0140.00414.88
7.0.140.0030.07321.92
7.0.60.0070.08319.87
7.0.50.0030.07317.88
7.0.40.0130.06320.02
7.0.30.0300.07020.24
7.0.20.0330.03720.33
7.0.10.0070.04320.16
7.0.00.0100.08320.22
5.6.280.0030.07321.04
5.6.210.0170.05020.51
5.6.200.0030.08318.18
5.6.190.0000.04720.41
5.6.180.0230.08020.63
5.6.170.0070.05020.43
5.6.160.0070.08320.59
5.6.150.0130.03318.25
5.6.140.0030.06018.11
5.6.130.0070.08318.14
5.6.120.0000.07321.02
5.6.110.0030.04020.95
5.6.100.0070.06020.99
5.6.90.0030.04321.10
5.6.80.0170.04020.38
5.6.70.4600.04020.48
5.5.350.0030.08720.34
5.5.340.0100.05317.95
5.5.330.0070.04020.13
5.5.320.0230.07020.27
5.5.310.0230.07720.51
5.5.300.0070.08317.94
5.5.290.0170.07017.93
5.5.280.0100.05020.80
5.5.270.0130.08020.80
5.5.260.0070.08320.86
5.5.250.0030.04020.58
5.5.240.0270.07020.27
5.4.450.0700.03719.20
5.4.440.0370.04719.54
5.4.430.0230.04719.57
5.4.420.0270.04319.60
5.4.410.0270.05019.50
5.4.400.0170.08018.84
5.4.390.0200.06019.15
5.4.380.0200.06018.60
5.4.370.0330.05018.76
5.4.360.0270.05718.54
5.4.350.0270.05318.84
5.4.340.0200.07318.77
5.4.320.0110.03612.50
5.4.310.0080.03612.50
5.4.300.0070.04612.50
5.4.290.0080.03612.50
5.4.280.0160.04612.37
5.4.270.0140.04912.37
5.4.260.0090.05412.38
5.4.250.0110.05412.38
5.4.240.0100.05112.37
5.4.230.0120.04812.37
5.4.220.0130.04712.37
5.4.210.0100.04612.36
5.4.200.0160.04312.37
5.4.190.0110.04712.36
5.4.180.0090.05012.36
5.4.170.0100.05012.37
5.4.160.0090.04912.37
5.4.150.0080.05312.37
5.4.140.0100.05412.05
5.4.130.0080.05212.03
5.4.120.0090.05411.99
5.4.110.0150.04711.99
5.4.100.0100.04711.99
5.4.90.0090.05311.99
5.4.80.0100.05111.99
5.4.70.0090.05011.99
5.4.60.0110.05011.98
5.4.50.0070.05311.99
5.4.40.0120.04611.97
5.4.30.0100.05011.97
5.4.20.0100.04711.97
5.4.10.0080.05011.97
5.4.00.0070.05411.46
5.3.290.0050.04112.80
5.3.280.0120.04512.71
5.3.270.0100.05212.72
5.3.260.0110.06112.72
5.3.250.0120.05012.72
5.3.240.0110.04912.72
5.3.230.0080.05112.71
5.3.220.0110.05112.68
5.3.210.0140.05212.68
5.3.200.0050.05412.68
5.3.190.0120.05312.68
5.3.180.0120.05112.67
5.3.170.0080.05612.67
5.3.160.0060.05612.67
5.3.150.0080.05312.68
5.3.140.0110.05212.66
5.3.130.0110.05512.66
5.3.120.0060.06012.66
5.3.110.0150.04912.66
5.3.100.0100.05112.12
5.3.90.0100.05212.08
5.3.80.0090.04712.07
5.3.70.0100.05112.07
5.3.60.0090.04312.07
5.3.50.0120.04612.00
5.3.40.0110.03612.00
5.3.30.0100.04811.96
5.3.20.0090.03511.75
5.3.10.0100.04611.71
5.3.00.0110.03611.70
5.2.170.0040.0369.20
5.2.160.0080.0369.20
5.2.150.0040.0419.20
5.2.140.0070.0399.19
5.2.130.0070.0409.15
5.2.120.0090.0349.15
5.2.110.0110.0339.17
5.2.100.0100.0389.17
5.2.90.0110.0379.16
5.2.80.0050.0339.16
5.2.70.0060.0459.15
5.2.60.0060.0309.10
5.2.50.0100.0399.07
5.2.40.0130.0349.05
5.2.30.0090.0289.04
5.2.20.0070.0389.02
5.2.10.0080.0408.93
5.2.00.0100.0308.80
5.1.60.0080.0348.08
5.1.50.0080.0308.07
5.1.40.0060.0378.06
5.1.30.0050.0408.41
5.1.20.0080.0378.43
5.1.10.0060.0378.15
5.1.00.0080.0388.15
5.0.50.0090.0266.63
5.0.40.0080.0266.49
5.0.30.0060.0416.30
5.0.20.0070.0266.27
5.0.10.0040.0306.25
5.0.00.0040.0436.24
4.4.90.0050.0234.78
4.4.80.0080.0194.75
4.4.70.0070.0364.75
4.4.60.0040.0224.75
4.4.50.0050.0144.77
4.4.40.0050.0324.71
4.4.30.0060.0214.76
4.4.20.0060.0214.85
4.4.10.0050.0224.85
4.4.00.0050.0294.76
4.3.110.0040.0224.66
4.3.100.0040.0154.66
4.3.90.0030.0224.63
4.3.80.0030.0264.58
4.3.70.0050.0174.63
4.3.60.0060.0214.63
4.3.50.0040.0224.63
4.3.40.0040.0284.54
4.3.30.0040.0193.28
4.3.20.0050.0193.27
4.3.10.0010.0173.23
4.3.00.0100.02013.47

preferences:
48.34 ms | 400 KiB | 5 Q