3v4l.org

run code in 300+ PHP versions simultaneously
<?php function x($o) { return get_object_vars($o); } class A { public $a; public $b; private $c; public function __construct($a, $b, $c) { $this->a = $a; $this->b = $b; $this->c = $c; } public function toArray() { return $this->getVars(); } public function getVars() { return x($this); } } $o = new A(1,2,3); var_dump($o->toArray());

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.01418.23
8.3.50.0130.00321.99
8.3.40.0040.01118.48
8.3.30.0070.00718.93
8.3.20.0000.00820.21
8.3.10.0070.00021.82
8.3.00.0000.00917.91
8.2.180.0140.00716.88
8.2.170.0030.01022.96
8.2.160.0110.00420.41
8.2.150.0000.00924.18
8.2.140.0070.00024.66
8.2.130.0000.00726.16
8.2.120.0070.00020.96
8.2.110.0060.00322.20
8.2.100.0070.00317.66
8.2.90.0060.00319.23
8.2.80.0060.00317.97
8.2.70.0000.00917.49
8.2.60.0000.01017.93
8.2.50.0060.00318.07
8.2.40.0000.00819.82
8.2.30.0000.00718.18
8.2.20.0040.00417.51
8.2.10.0000.00718.00
8.2.00.0000.00817.63
8.1.280.0190.00325.92
8.1.270.0060.00323.73
8.1.260.0050.00226.35
8.1.250.0050.00228.09
8.1.240.0040.00823.86
8.1.230.0110.00019.16
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0000.00818.57
8.1.160.0040.00422.00
8.1.150.0050.00218.93
8.1.140.0000.00717.30
8.1.130.0060.00017.84
8.1.120.0000.00717.42
8.1.110.0000.00717.30
8.1.100.0000.00717.30
8.1.90.0000.00717.38
8.1.80.0060.00317.29
8.1.70.0030.00317.36
8.1.60.0040.00417.57
8.1.50.0030.00517.56
8.1.40.0040.00417.58
8.1.30.0080.00017.67
8.1.20.0040.00417.61
8.1.10.0030.00517.45
8.1.00.0030.00517.38
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0030.00318.43
8.0.270.0030.00417.19
8.0.260.0030.00317.08
8.0.250.0030.00316.89
8.0.240.0060.00316.84
8.0.230.0000.00716.93
8.0.220.0000.00716.75
8.0.210.0000.00716.86
8.0.200.0040.00416.78
8.0.190.0060.00316.77
8.0.180.0000.00716.77
8.0.170.0050.00316.83
8.0.160.0000.00816.91
8.0.150.0000.00716.68
8.0.140.0000.00716.73
8.0.130.0000.00613.26
8.0.120.0070.00016.72
8.0.110.0050.00316.86
8.0.100.0040.00416.79
8.0.90.0000.00716.81
8.0.80.0060.01016.73
8.0.70.0000.00716.69
8.0.60.0040.00416.90
8.0.50.0040.00416.71
8.0.30.0080.01416.95
8.0.20.0110.00917.40
8.0.10.0050.00216.81
8.0.00.0080.00916.77
7.4.330.0050.00015.00
7.4.320.0030.00316.55
7.4.300.0030.00316.61
7.4.290.0040.00416.62
7.4.280.0050.00316.61
7.4.270.0080.00016.50
7.4.260.0030.00316.50
7.4.250.0000.00716.40
7.4.240.0030.00316.55
7.4.230.0050.00216.68
7.4.220.0060.00916.56
7.4.210.0100.01016.41
7.4.200.0030.00616.59
7.4.160.0040.01316.34
7.4.150.0040.01417.40
7.4.140.0110.00717.86
7.4.130.0160.00616.38
7.4.120.0110.00616.52
7.4.110.0130.00316.40
7.4.100.0130.00416.35
7.4.90.0170.00016.32
7.4.80.0030.01319.39
7.4.70.0080.00916.33
7.4.60.0120.00616.68
7.4.50.0030.00616.41
7.4.40.0100.00716.58
7.4.30.0080.00816.65
7.4.00.0070.00714.70
7.3.330.0030.00313.29
7.3.320.0060.00013.25
7.3.310.0000.00716.32
7.3.300.0070.00016.26
7.3.290.0030.01016.29
7.3.280.0060.01216.30
7.3.270.0210.00417.40
7.3.260.0060.01716.25
7.3.250.0070.01016.51
7.3.240.0060.01116.32
7.3.230.0090.00616.39
7.3.210.0090.01316.64
7.3.200.0140.00819.39
7.3.190.0060.01016.40
7.3.180.0110.00916.16
7.3.170.0030.01416.29
7.3.160.0100.00716.39
7.3.120.0100.00314.61
7.2.330.0080.01016.37
7.2.320.0120.00416.75
7.2.310.0110.00616.56
7.2.300.0060.00916.44
7.2.290.0100.01316.71
7.2.60.0130.00616.80
7.2.00.0030.00919.40
7.1.200.0040.00715.88
7.1.100.0000.01117.88
7.1.70.0040.00416.94
7.1.60.0110.01519.11
7.1.50.0140.00716.93
7.1.00.0030.07722.40
7.0.200.0030.00316.72
7.0.140.0000.07722.09
7.0.100.0100.03320.02
7.0.90.0030.08319.91
7.0.80.0070.04020.11
7.0.70.0000.06319.92
7.0.60.0000.05019.98
7.0.50.0070.07320.27
7.0.40.0070.08320.11
7.0.30.0000.04720.10
7.0.20.0000.04720.11
7.0.10.0030.07320.03
7.0.00.0130.08020.03
5.6.280.0100.06720.78
5.6.250.0000.04320.71
5.6.240.0130.08320.63
5.6.230.0100.06320.57
5.6.220.0070.08020.66
5.6.210.0070.07720.73
5.6.200.0030.07721.03
5.6.190.0170.07321.04
5.6.180.0070.03721.14
5.6.170.0000.05721.03
5.6.160.0200.06320.96
5.6.150.0100.03321.03
5.6.140.0100.03321.09
5.6.130.0000.04321.07
5.6.120.0200.06720.94
5.6.110.0130.09321.09
5.6.100.0030.08321.10
5.6.90.0070.03721.07
5.6.80.0030.05320.51
5.6.70.0030.06320.45
5.6.60.0100.03320.34
5.6.50.0030.04020.50
5.6.40.0070.07320.44
5.6.30.0030.07320.39
5.6.20.0070.03720.44
5.6.10.0070.03720.45
5.6.00.0070.06020.36
5.5.380.0100.06320.50
5.5.370.0000.08320.50
5.5.360.0070.08020.53
5.5.350.0070.07720.45
5.5.340.0100.06720.65
5.5.330.0070.07020.94
5.5.320.0070.08720.81
5.5.310.0070.05720.92
5.5.300.0230.06020.86
5.5.290.0130.07320.91
5.5.280.0070.08020.78
5.5.270.0070.05020.80
5.5.260.0100.07020.83
5.5.250.0030.08020.46
5.5.240.0070.07320.14
5.5.230.0070.07320.17
5.5.220.0030.04720.10
5.5.210.0130.04320.27
5.5.200.0070.07720.30
5.5.190.0070.07720.19
5.5.180.0000.04320.19
5.5.160.0100.05720.00
5.5.150.0100.07319.97
5.5.140.0070.05020.16
5.5.130.0070.04320.11
5.5.120.0000.08320.09
5.5.110.0000.07320.14
5.5.100.0000.04320.09
5.5.90.0130.06720.10
5.5.80.0130.07320.18
5.5.70.0100.07320.00
5.5.60.0030.03720.14
5.5.50.0030.08320.06
5.5.40.0030.08020.11
5.5.30.0030.07720.11
5.5.20.0030.03720.05
5.5.10.0070.06320.01
5.5.00.0130.04020.05
5.4.450.0070.07319.36
5.4.440.0030.08019.36
5.4.430.0070.03319.46
5.4.420.0030.05719.53
5.4.410.0100.04719.16
5.4.400.0070.03019.17
5.4.390.0070.07318.90
5.4.380.0100.07019.09
5.4.370.0030.03319.14
5.4.360.0000.06319.14
5.4.350.0130.05719.04
5.4.340.0070.07719.24
5.4.320.0100.05319.16
5.4.310.0070.09019.10
5.4.300.0100.06319.06
5.4.290.0130.06019.20
5.4.280.0100.07319.09
5.4.270.0100.04019.18
5.4.260.0130.07018.95
5.4.250.0070.07719.04
5.4.240.0030.06318.84
5.4.230.0070.07319.03
5.4.220.0030.07319.24
5.4.210.0030.04718.95
5.4.200.0070.08018.89
5.4.190.0030.06718.89
5.4.180.0100.06719.03
5.4.170.0030.03719.20
5.4.160.0100.06718.86
5.4.150.0170.06018.86
5.4.140.0030.04016.46
5.4.130.0030.07016.44
5.4.120.0070.07316.44
5.4.110.0000.03716.47
5.4.100.0000.07016.45
5.4.90.0030.07716.45
5.4.80.0030.04316.47
5.4.70.0000.04316.55
5.4.60.0130.05016.25
5.4.50.0030.04016.44
5.4.40.0030.07016.59
5.4.30.0070.06716.41
5.4.20.0100.07016.39
5.4.10.0130.06716.24
5.4.00.0070.07315.84
5.3.290.0000.07714.64
5.3.280.0000.05014.63
5.3.270.0170.06314.55
5.3.260.0030.03714.64
5.3.250.0030.07014.67
5.3.240.0000.04314.64
5.3.230.0000.08014.61
5.3.220.0070.07314.55
5.3.210.0100.06014.56
5.3.200.0000.05714.52
5.3.190.0030.08314.47
5.3.180.0070.07014.68
5.3.170.0170.05714.55
5.3.160.0170.05714.69
5.3.150.0030.08714.69
5.3.140.0070.06314.70
5.3.130.0070.07014.50
5.3.120.0030.04714.61
5.3.110.0100.07014.69
5.3.100.0000.03714.05
5.3.90.0100.05314.00
5.3.80.0000.07314.13
5.3.70.0030.05714.14
5.3.60.0030.04314.07
5.3.50.0070.05713.97
5.3.40.0070.06713.94
5.3.30.0030.07313.98
5.3.20.0100.06713.76
5.3.10.0000.07013.65
5.3.00.0070.05713.76
5.2.170.0030.05311.17
5.2.160.0030.06311.09
5.2.150.0100.04711.25
5.2.140.0070.05011.14
5.2.130.0070.05711.13
5.2.120.0030.02711.16
5.2.110.0030.03011.17
5.2.100.0000.04311.14
5.2.90.0030.05011.20
5.2.80.0030.06311.20
5.2.70.0030.06011.11
5.2.60.0030.03311.13
5.2.50.0000.03010.97
5.2.40.0030.05311.02
5.2.30.0100.02011.09
5.2.20.0000.03311.04
5.2.10.0130.05310.98
5.2.00.0030.06310.97
5.1.60.0070.03010.97
5.1.50.0030.02010.97
5.1.40.0070.04010.97
5.1.30.0030.02310.97
5.1.20.0100.05010.97
5.1.10.0030.04310.98
5.1.00.0000.05710.98
5.0.50.0000.04710.98
5.0.40.0030.01710.98
5.0.30.0000.04010.98
5.0.20.0000.02310.98
5.0.10.0000.02010.98
5.0.00.0030.06010.98
4.4.90.0000.02310.97
4.4.80.0030.03310.97
4.4.70.0000.04710.97
4.4.60.0030.03010.97
4.4.50.0030.01310.97
4.4.40.0000.02310.97
4.4.30.0000.03710.97
4.4.20.0000.04010.98
4.4.10.0030.03010.98
4.4.00.0000.05710.98
4.3.110.0030.02310.98
4.3.100.0000.03010.98
4.3.90.0000.01310.98
4.3.80.0000.04010.98
4.3.70.0030.03010.98
4.3.60.0070.02710.98
4.3.50.0000.03710.98
4.3.40.0070.01710.98
4.3.30.0000.02310.98
4.3.20.0030.02010.98
4.3.10.0000.01310.98
4.3.00.0000.01310.98

preferences:
34.49 ms | 401 KiB | 5 Q