3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ private $bar = 'baz'; public function setBar($bar) { $this->bar = $bar; } } $hydrator = Closure::bind( function ($obj) { return get_object_vars($obj); }, null, // required blueprint! 'Foo' // setting correct class scope (in case of inheritances) ); var_dump($hydrator(new Foo())); $foo2 = new Foo(); $foo2->setBar('TAB!'); var_dump($hydrator($foo2));

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.01216.63
8.3.50.0170.00318.34
8.3.40.0110.00418.72
8.3.30.0120.00318.57
8.3.20.0080.00018.78
8.3.10.0090.00020.43
8.3.00.0090.00019.27
8.2.180.0070.01416.38
8.2.170.0090.00622.96
8.2.160.0070.01018.79
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0140.00026.16
8.2.120.0060.00320.46
8.2.110.0000.01020.86
8.2.100.0090.00317.66
8.2.90.0040.00419.52
8.2.80.0050.00319.33
8.2.70.0040.00417.50
8.2.60.0050.00318.04
8.2.50.0090.00018.07
8.2.40.0040.00417.92
8.2.30.0040.00417.95
8.2.20.0030.00717.62
8.2.10.0000.00717.56
8.2.00.0000.00717.73
8.1.280.0140.00725.92
8.1.270.0060.00323.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00622.46
8.1.230.0070.00420.97
8.1.220.0050.00317.74
8.1.210.0030.00718.87
8.1.200.0000.00917.23
8.1.190.0000.00717.53
8.1.180.0050.00318.10
8.1.170.0060.00318.84
8.1.160.0000.00718.94
8.1.150.0030.00718.52
8.1.140.0040.00417.46
8.1.130.0070.00017.83
8.1.120.0000.00717.37
8.1.110.0000.00717.53
8.1.100.0080.00017.38
8.1.90.0000.00717.36
8.1.80.0040.00417.43
8.1.70.0030.00317.41
8.1.60.0060.00317.47
8.1.50.0080.00017.36
8.1.40.0040.00417.55
8.1.30.0040.00417.52
8.1.20.0040.00417.61
8.1.10.0050.00217.53
8.1.00.0050.00317.48
8.0.300.0050.00219.71
8.0.290.0040.00416.63
8.0.280.0070.00018.36
8.0.270.0030.00317.23
8.0.260.0030.00316.74
8.0.250.0040.00416.86
8.0.240.0070.00016.83
8.0.230.0030.00316.82
8.0.220.0070.00016.73
8.0.210.0040.00416.67
8.0.200.0030.00316.90
8.0.190.0030.00316.85
8.0.180.0000.00716.93
8.0.170.0060.00316.74
8.0.160.0000.00716.89
8.0.150.0000.00816.73
8.0.140.0050.00316.81
8.0.130.0000.00513.35
8.0.120.0040.00416.80
8.0.110.0000.00716.91
8.0.100.0040.00416.77
8.0.90.0040.00416.71
8.0.80.0090.01216.84
8.0.70.0040.00416.89
8.0.60.0040.00416.79
8.0.50.0000.00816.95
8.0.30.0090.01216.98
8.0.20.0120.00817.03
8.0.10.0040.00416.97
8.0.00.0160.00816.78
7.4.330.0030.00312.97
7.4.320.0060.00016.41
7.4.300.0040.00416.60
7.4.290.0070.00016.52
7.4.280.0000.00816.58
7.4.270.0040.00416.59
7.4.260.0000.00613.27
7.4.250.0080.00016.55
7.4.240.0000.00716.51
7.4.230.0000.00716.70
7.4.220.0060.01216.56
7.4.210.0130.00716.54
7.4.200.0030.00616.34
7.4.190.0030.00316.73
7.4.160.0060.00916.29
7.4.150.0070.01116.63
7.4.140.0100.01016.61
7.4.130.0030.01316.47
7.4.120.0100.01016.61
7.4.110.0070.01116.50
7.4.100.0040.01316.66
7.4.90.0070.01016.55
7.4.80.0090.01516.47
7.4.70.0200.00316.54
7.4.60.0110.00616.51
7.4.50.0070.00016.46
7.4.40.0000.01516.31
7.4.30.0110.00716.66
7.4.00.0090.00714.87
7.3.330.0000.00613.31
7.3.320.0030.00313.22
7.3.310.0070.00016.32
7.3.300.0060.00016.27
7.3.290.0080.00816.28
7.3.280.0130.00416.33
7.3.270.0090.00916.27
7.3.260.0140.01216.47
7.3.250.0140.00616.44
7.3.240.0060.01316.33
7.3.230.0140.01216.48
7.3.210.0130.00316.57
7.3.200.0120.00919.39
7.3.190.0150.01216.24
7.3.180.0110.00516.51
7.3.170.0090.00616.29
7.3.160.0090.00616.28
7.3.120.0070.00914.74
7.3.110.0000.01314.78
7.3.100.0040.01214.77
7.3.90.0070.01014.75
7.3.80.0000.01314.67
7.3.70.0030.00914.93
7.3.60.0080.00314.91
7.3.50.0070.01314.78
7.3.40.0100.00314.52
7.3.30.0090.00614.73
7.3.20.0030.01316.59
7.3.10.0030.01016.68
7.3.00.0000.00916.63
7.2.330.0070.01016.72
7.2.320.0120.00916.31
7.2.310.0090.00916.44
7.2.300.0090.00916.69
7.2.290.0120.00616.38
7.2.250.0070.01314.97
7.2.240.0030.01315.21
7.2.230.0070.01314.43
7.2.220.0000.01414.92
7.2.210.0050.00515.13
7.2.200.0030.00914.89
7.2.190.0040.01115.00
7.2.180.0040.01214.98
7.2.170.0070.00714.81
7.2.60.0190.00016.63
7.2.50.0100.00316.71
7.1.330.0040.01215.56
7.1.320.0060.00815.77
7.1.310.0080.00815.94
7.1.300.0030.01715.80
7.1.290.0000.01015.75
7.1.280.0030.01015.67
7.1.270.0000.01015.63
7.1.260.0100.00315.68
7.1.200.0040.00815.67
7.1.100.0040.00817.83
7.1.70.0070.00016.94
7.1.60.0060.00919.31
7.1.50.0040.00716.82
7.1.00.0030.05722.51
7.0.200.0030.00616.72
7.0.140.0030.05022.09
7.0.120.0100.06322.18
7.0.60.0170.02720.07
7.0.50.0100.07317.88
7.0.40.0000.04720.02
7.0.30.0300.07320.11
7.0.20.0300.07320.29
7.0.10.0030.04720.26
7.0.00.0000.05020.30
5.6.210.0030.08020.51
5.6.200.0030.07018.16
5.6.190.0000.04720.46
5.6.180.0370.06720.61
5.6.170.0300.07020.56
5.6.160.0100.07020.46
5.6.150.0100.05718.18
5.6.140.0030.08318.18
5.6.130.0070.08718.17
5.6.120.0170.08021.00
5.6.110.0030.05721.02
5.6.100.0100.06021.10
5.6.90.0100.06720.98
5.6.80.0070.05720.41
5.5.350.0070.08020.40
5.5.340.0100.06718.09
5.5.330.0070.04320.19
5.5.320.0130.04320.30
5.5.310.0270.04020.32
5.5.300.0030.03717.95
5.5.290.0130.08717.97
5.5.280.0100.08020.80
5.5.270.0070.05720.77
5.5.260.0170.07720.84
5.5.250.0100.07720.62
5.5.240.4270.03720.24
5.4.450.0100.03719.20
5.4.440.0030.04019.51
5.4.430.0100.03019.33
5.4.420.0030.03719.20
5.4.410.0070.03319.05
5.4.400.0000.04318.90
5.4.390.0070.03719.15
5.4.380.0100.03019.11
5.4.370.0070.03718.98
5.4.360.0030.04018.88
5.4.350.0100.03318.92
5.4.340.0000.04319.12
5.4.320.0070.03319.05
5.4.310.0000.04018.86
5.4.300.0030.03718.98
5.4.290.0000.04019.12
5.4.280.0070.03318.89
5.4.270.0030.04019.00
5.4.260.0070.03319.07
5.4.250.0030.03719.23
5.4.240.0030.04319.23
5.4.230.0000.06019.07
5.4.220.0100.03719.14
5.4.210.0070.06318.86
5.4.200.0030.04319.23
5.4.190.0130.03318.86
5.4.180.0070.06319.23
5.4.170.0100.07719.07
5.4.160.0130.06018.84
5.4.150.0030.07018.98
5.4.140.0070.04716.33
5.4.130.0030.04716.48
5.4.120.0100.07016.34
5.4.110.0100.04016.43
5.4.100.0000.04716.30
5.4.90.0100.03016.67
5.4.80.0070.08016.37
5.4.70.0100.07016.29
5.4.60.0000.06716.43
5.4.50.0070.07016.36
5.4.40.0130.03316.41
5.4.30.0030.04016.36
5.4.20.0070.07316.39
5.4.10.0030.05316.46
5.4.00.0030.04315.80
5.3.290.0000.04714.67
5.3.280.0000.05014.67
5.3.270.0100.07314.61
5.3.260.0070.07714.63
5.3.250.0000.08314.60
5.3.240.0030.04714.68
5.3.230.0070.07314.60
5.3.220.0000.05014.63
5.3.210.0130.05014.62
5.3.200.0070.05314.58
5.3.190.0100.03014.62
5.3.180.0130.04314.59
5.3.170.0070.03714.60
5.3.160.0130.03714.55
5.3.150.0030.08014.61
5.3.140.0100.07314.63
5.3.130.0070.08014.57
5.3.120.0000.08314.60
5.3.110.0130.07314.47
5.3.100.0070.08014.09
5.3.90.0030.06313.91
5.3.80.0070.03714.02
5.3.70.0070.04714.03
5.3.60.0070.07713.89
5.3.50.0170.06013.99
5.3.40.0030.07313.95
5.3.30.0100.06313.84
5.3.20.0030.05713.86
5.3.10.0070.03713.80
5.3.00.0130.05713.70
5.2.170.0030.04311.12
5.2.160.0030.07011.30
5.2.150.0000.04311.31
5.2.140.0170.02011.15
5.2.130.0100.05711.07
5.2.120.0030.04311.07
5.2.110.0030.06711.15
5.2.100.0070.06011.05
5.2.90.0030.04311.05
5.2.80.0070.05311.25
5.2.70.0030.04711.13
5.2.60.0030.04711.05
5.2.50.0030.04711.17
5.2.40.0030.04710.91
5.2.30.0030.03311.02
5.2.20.0000.03011.12
5.2.10.0100.03010.93
5.2.00.0000.06310.75
5.1.60.0070.05010.04
5.1.50.0000.03310.02
5.1.40.0030.02710.12
5.1.30.0030.05310.35
5.1.20.0000.06310.52
5.1.10.0030.0379.98
5.1.00.0070.05710.07
5.0.50.0030.0208.61
5.0.40.0000.0378.43
5.0.30.0030.0508.13
5.0.20.0070.0208.19
5.0.10.0070.0378.15
5.0.00.0000.0708.21
4.4.90.0000.0337.82
4.4.80.0000.0277.82
4.4.70.0030.0307.82
4.4.60.0000.0237.82
4.4.50.0000.0207.82
4.4.40.0000.0377.82
4.4.30.0000.0177.82
4.4.20.0000.0407.82
4.4.10.0000.0237.82
4.4.00.0030.0377.82
4.3.110.0030.0337.82
4.3.100.0030.0307.82
4.3.90.0100.0307.82
4.3.80.0000.0307.82
4.3.70.0030.0337.82
4.3.60.0000.0337.82
4.3.50.0030.0377.82
4.3.40.0030.0537.82
4.3.30.0030.0337.82
4.3.20.0000.0337.82
4.3.10.0030.0277.82
4.3.00.0030.0237.82

preferences:
40.05 ms | 401 KiB | 5 Q