3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A extends SplObjectStorage { protected $a = null; public function __construct() { $this->a = '123'; } public function getA() { return $this->a; } } $serialized = serialize(new A()); $obj = unserialize($serialized); $reader = function & ($object, $property) { $value = & \Closure::bind(function & () use ($property) { return $this->$property; }, $object, $object)->__invoke(); return $value; }; $test3 = & $reader($obj, 'a'); echo "Result from Getter\n"; var_dump($obj->getA()); echo "Result from Reflection\n"; var_Dump($test3); echo "This is the deserialized Object\n"; var_Dump($obj);

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.0100.01016.61
8.3.50.0120.00622.05
8.3.40.0110.00418.82
8.3.30.0070.00718.84
8.3.20.0020.00520.11
8.3.10.0000.00721.89
8.3.00.0080.00020.77
8.2.180.0070.00725.92
8.2.170.0090.00618.89
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0050.00224.66
8.2.130.0040.00422.15
8.2.120.0000.00826.35
8.2.110.0030.00919.37
8.2.100.0060.00617.91
8.2.90.0040.00419.76
8.2.80.0000.00817.97
8.2.70.0040.00417.93
8.2.60.0040.00418.22
8.2.50.0000.01118.10
8.2.40.0050.00319.44
8.2.30.0040.00419.20
8.2.20.0080.00017.61
8.2.10.0050.00218.08
8.2.00.0080.00017.93
8.1.280.0120.00325.92
8.1.270.0040.00424.66
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0030.00719.13
8.1.230.0040.00822.75
8.1.220.0040.00417.75
8.1.210.0000.00818.86
8.1.200.0000.01017.35
8.1.190.0000.00817.36
8.1.180.0000.00818.10
8.1.170.0030.00618.66
8.1.160.0040.00419.03
8.1.150.0040.00418.91
8.1.140.0080.00019.48
8.1.130.0050.00217.68
8.1.120.0050.00317.46
8.1.110.0030.00517.49
8.1.100.0000.00717.46
8.1.90.0000.00717.47
8.1.80.0070.00017.47
8.1.70.0000.00717.35
8.1.60.0000.00717.49
8.1.50.0000.00817.52
8.1.40.0090.00017.51
8.1.30.0000.00817.70
8.1.20.0000.00817.71
8.1.10.0000.00817.48
8.1.00.0000.00817.37
8.0.300.0040.00420.16
8.0.290.0000.00716.75
8.0.280.0000.00718.50
8.0.270.0040.00416.89
8.0.260.0060.00017.18
8.0.250.0040.00416.97
8.0.240.0040.00417.04
8.0.230.0000.00716.95
8.0.220.0080.00016.95
8.0.210.0030.00316.93
8.0.200.0060.00017.07
8.0.190.0030.00617.02
8.0.180.0040.00417.05
8.0.170.0040.00416.90
8.0.160.0040.00417.07
8.0.150.0000.00716.77
8.0.140.0040.00416.94
8.0.130.0060.00013.44
8.0.120.0000.00916.93
8.0.110.0040.00416.93
8.0.100.0070.00016.90
8.0.90.0030.00516.85
8.0.80.0110.00616.98
8.0.70.0040.00416.99
8.0.60.0050.00217.03
8.0.50.0050.00316.95
8.0.30.0110.00917.21
8.0.20.0110.01017.40
8.0.10.0000.00717.07
8.0.00.0100.00916.72
7.4.330.0000.00515.08
7.4.320.0050.00316.46
7.4.300.0030.00316.61
7.4.290.0090.00016.49
7.4.280.0060.00316.62
7.4.270.0000.00716.63
7.4.260.0000.00716.53
7.4.250.0000.00816.62
7.4.240.0030.00516.54
7.4.230.0040.00416.51
7.4.220.0090.00916.45
7.4.210.0060.01216.54
7.4.200.0000.00716.55
7.4.160.0090.00616.55
7.4.150.0090.01317.40
7.4.140.0090.01117.86
7.4.130.0140.00416.52
7.4.120.0050.01316.53
7.4.110.0100.00716.46
7.4.100.0090.01216.57
7.4.90.0150.00316.60
7.4.80.0110.01119.39
7.4.70.0090.00616.45
7.4.60.0100.00616.48
7.4.50.0090.00616.48
7.4.40.0130.00716.61
7.4.30.0140.00716.56
7.4.00.0090.00914.94
7.3.330.0060.00013.38
7.3.320.0000.00513.22
7.3.310.0030.00316.23
7.3.300.0070.00016.38
7.3.290.0000.00716.36
7.3.280.0160.00316.35
7.3.270.0120.00617.40
7.3.260.0100.00616.71
7.3.250.0120.00716.45
7.3.240.0110.00816.47
7.3.230.0130.00716.42
7.3.210.0090.00916.43
7.3.200.0100.01016.66
7.3.190.0090.00916.62
7.3.180.0000.01616.54
7.3.170.0070.01116.52
7.3.160.0090.01216.54
7.3.120.0120.00614.57
7.3.110.0040.01115.09
7.3.100.0130.00314.69
7.3.90.0070.01115.02
7.3.80.0100.01014.86
7.3.70.0000.01914.85
7.3.60.0060.00914.94
7.3.50.0040.00814.79
7.3.40.0090.00314.88
7.3.30.0130.00314.86
7.3.20.0070.00716.46
7.3.10.0000.01016.59
7.3.00.0070.00716.72
7.2.330.0070.01416.85
7.2.320.0140.01016.79
7.2.310.0080.01416.81
7.2.300.0150.00416.42
7.2.290.0090.00616.75
7.2.250.0030.01615.26
7.2.240.0030.01314.98
7.2.230.0100.01015.23
7.2.220.0040.01114.92
7.2.210.0100.00714.96
7.2.200.0030.01415.05
7.2.190.0040.01115.10
7.2.180.0070.00715.05
7.2.170.0070.01115.27
7.2.160.0070.01115.04
7.2.150.0040.01116.89
7.2.140.0030.00616.99
7.2.130.0090.00416.97
7.2.120.0070.00716.90
7.2.110.0060.00917.05
7.2.100.0090.00617.00
7.2.90.0030.00817.03
7.2.80.0030.01216.82
7.2.70.0060.00916.95
7.2.60.0060.00717.05
7.2.50.0030.01016.98
7.2.40.0090.00317.02
7.2.30.0030.01216.92
7.2.20.0130.00317.15
7.2.10.0060.00316.90
7.2.00.0130.00317.01
7.1.330.0110.00415.81
7.1.320.0000.01315.71
7.1.310.0060.00915.77
7.1.300.0000.01815.85
7.1.290.0000.00915.54
7.1.280.0060.00915.86
7.1.270.0070.00715.67
7.1.260.0050.00315.54
7.1.250.0070.00715.80
7.1.200.0030.01015.70
7.1.70.0030.01016.93
7.1.60.0070.01719.48
7.1.50.0110.01117.05
7.1.00.0070.07322.43
7.0.200.0550.00314.38
7.0.100.0300.06719.84
7.0.90.0230.07019.90
7.0.80.0030.04319.93
7.0.70.0100.08019.87
7.0.60.0300.07719.89
7.0.50.0130.08020.35
7.0.40.0030.04719.94
7.0.30.0070.09020.13
7.0.20.0100.07319.98
7.0.10.0130.07020.09
7.0.00.0030.09020.06
5.6.280.0100.06721.06
5.6.250.0100.06020.69
5.6.240.0070.06320.56
5.6.230.0130.06720.55
5.6.220.0070.04320.61
5.6.210.0130.08320.42
5.6.200.0070.08321.01
5.6.190.0030.05721.04
5.6.180.0130.04021.14
5.6.170.0070.06020.97
5.6.160.0070.05021.00
5.6.150.0170.07720.91
5.6.140.0030.05320.92
5.6.130.0130.03720.91
5.6.120.0100.06320.90
5.6.110.0100.08021.04
5.6.100.0070.08020.95
5.6.90.0100.05720.90
5.6.80.0070.08020.42
5.6.70.0000.06320.39
5.6.60.0070.05320.47
5.6.50.0100.07320.38
5.6.40.0070.08320.41
5.6.30.0100.07320.34
5.6.20.0130.08020.40
5.6.10.0070.07720.34
5.6.00.0170.07020.39
5.5.380.0100.04320.30
5.5.370.0070.07320.41
5.5.360.0030.06020.31
5.5.350.0130.07320.32
5.5.340.0070.05320.73
5.5.330.0130.07720.90
5.5.320.0030.07320.80
5.5.310.0100.05720.83
5.5.300.0170.06020.70
5.5.290.0100.06020.61
5.5.280.0030.08720.89
5.5.270.0070.06320.82
5.5.260.0100.07320.89
5.5.250.0100.08320.43
5.5.240.0000.08020.19
5.5.230.0030.07020.27
5.5.220.0070.08020.20
5.5.210.0100.08320.24
5.5.200.0070.05720.16
5.5.190.0130.08020.21
5.5.180.0130.07020.09
5.5.160.0070.04320.09
5.5.150.0070.07320.21
5.5.140.0130.06020.09
5.5.130.0000.07020.19
5.5.120.0100.05720.23
5.5.110.0070.07720.24
5.5.100.0100.07720.05
5.5.90.0170.06020.13
5.5.80.0170.06720.04
5.5.70.0130.05719.93
5.5.60.0030.04320.11
5.5.50.0100.05720.02
5.5.40.0200.07020.10
5.5.30.0030.08720.02
5.5.20.0100.04720.07
5.5.10.0070.07320.10
5.5.00.0170.07719.94

preferences:
55.65 ms | 401 KiB | 5 Q