3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A extends SplObjectStorage { protected $b; protected $a = [ 'date' => null, ]; public function __construct(B $b) { $this->b = $b; $this->a = [ 'date' => '123', ]; } public function getA() { return $this->a; } } class B{} $serialized = serialize(new A(new B)); $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.0110.00416.38
8.3.50.0140.00421.27
8.3.40.0040.01118.88
8.3.30.0040.01118.72
8.3.20.0070.00020.34
8.3.10.0000.00821.95
8.3.00.0080.00020.87
8.2.180.0140.00716.32
8.2.170.0070.00722.96
8.2.160.0070.01119.20
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00722.25
8.2.120.0100.00326.35
8.2.110.0030.00622.08
8.2.100.0040.00817.93
8.2.90.0040.00419.27
8.2.80.0000.00917.97
8.2.70.0050.00317.38
8.2.60.0040.00418.05
8.2.50.0040.00718.10
8.2.40.0040.00420.64
8.2.30.0040.00420.68
8.2.20.0040.00417.64
8.2.10.0050.00217.92
8.2.00.0040.00418.00
8.1.280.0150.00425.92
8.1.270.0060.00323.96
8.1.260.0070.00028.09
8.1.250.0050.00228.09
8.1.240.0030.00720.68
8.1.230.0040.00817.79
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.25
8.1.190.0000.00817.25
8.1.180.0000.00818.10
8.1.170.0000.00818.61
8.1.160.0040.00420.88
8.1.150.0000.00718.95
8.1.140.0040.00422.01
8.1.130.0080.00017.66
8.1.120.0000.00717.44
8.1.110.0040.00417.43
8.1.100.0040.00417.43
8.1.90.0030.00617.41
8.1.80.0050.00217.42
8.1.70.0000.00717.41
8.1.60.0040.00417.58
8.1.50.0060.00317.55
8.1.40.0030.00517.42
8.1.30.0090.00017.66
8.1.20.0030.00617.56
8.1.10.0080.00017.50
8.1.00.0040.00417.49
8.0.300.0040.00418.77
8.0.290.0000.00916.75
8.0.280.0040.00418.46
8.0.270.0040.00417.27
8.0.260.0000.00617.26
8.0.250.0070.00017.02
8.0.240.0040.00416.98
8.0.230.0030.00316.84
8.0.220.0030.00316.92
8.0.210.0040.00416.97
8.0.200.0030.00317.00
8.0.190.0000.00816.96
8.0.180.0050.00216.95
8.0.170.0000.00816.84
8.0.160.0040.00416.88
8.0.150.0040.00416.85
8.0.140.0040.00416.76
8.0.130.0000.00513.32
8.0.120.0000.00816.92
8.0.110.0000.00816.83
8.0.100.0000.00716.80
8.0.90.0040.00416.97
8.0.80.0180.00316.87
8.0.70.0000.00816.85
8.0.60.0070.00016.73
8.0.50.0040.00416.92
8.0.30.0040.01516.95
8.0.20.0140.00417.40
8.0.10.0070.00017.02
8.0.00.0110.00816.80
7.4.330.0050.00015.08
7.4.320.0060.00016.51
7.4.300.0000.00716.45
7.4.290.0040.00316.52
7.4.280.0070.00016.49
7.4.270.0050.00216.61
7.4.260.0000.00716.59
7.4.250.0000.00816.55
7.4.240.0070.00016.50
7.4.230.0030.00316.69
7.4.220.0140.00916.64
7.4.210.0060.01116.59
7.4.200.0040.00416.59
7.4.160.0140.00716.58
7.4.150.0090.00917.40
7.4.140.0120.00617.86
7.4.130.0110.00916.52
7.4.120.0110.00616.54
7.4.110.0070.01016.56
7.4.100.0030.01516.60
7.4.90.0100.00716.69
7.4.80.0090.00919.39
7.4.70.0060.00916.50
7.4.60.0040.01416.58
7.4.50.0070.00716.62
7.4.40.0130.01016.61
7.4.30.0120.00616.34
7.4.00.0060.01215.05
7.3.330.0000.00513.16
7.3.320.0050.00013.18
7.3.310.0040.00416.34
7.3.300.0070.00016.31
7.3.290.0000.00716.25
7.3.280.0090.01116.32
7.3.270.0120.00617.40
7.3.260.0150.00916.33
7.3.250.0130.01116.40
7.3.240.0100.01116.59
7.3.230.0130.00316.39
7.3.210.0090.00916.49
7.3.200.0080.00816.43
7.3.190.0040.01216.43
7.3.180.0070.01016.38
7.3.170.0090.01216.39
7.3.160.0090.00616.26
7.2.330.0120.00616.80
7.2.320.0100.00716.79
7.2.310.0080.00816.88
7.2.300.0180.00016.60
7.2.290.0100.00616.52
7.2.60.0040.01216.83
7.2.00.0030.01019.53
7.1.200.0090.00315.55
7.1.100.0030.00918.25
7.1.70.0000.00817.18
7.1.60.0100.01319.48
7.1.50.0090.01316.64
7.1.00.0000.07722.54
7.0.200.0150.00715.05
7.0.60.0070.08021.81
7.0.50.0000.04717.91
7.0.40.0570.05720.30
7.0.30.0630.05020.10
7.0.20.0700.05320.12
7.0.10.0370.06720.39
7.0.00.0100.06320.09
5.6.280.0130.05720.93
5.6.210.0030.04720.55
5.6.200.0070.04018.19
5.6.190.0530.05320.47
5.6.180.0500.07020.60
5.6.170.0530.07320.45
5.6.160.0270.05020.45
5.6.150.0200.06020.36
5.6.140.0230.05320.30
5.6.130.0170.06320.61
5.6.120.0170.05720.42
5.6.110.0100.06320.42
5.6.100.0100.06720.38
5.6.90.0200.06720.20
5.6.80.0200.05719.79
5.6.70.0100.06319.96
5.6.60.0170.06319.79
5.6.50.0330.06019.75
5.6.40.0300.04719.67
5.6.30.0100.06319.76
5.6.20.0300.07719.66
5.6.10.0170.06319.75
5.6.00.0200.05319.76
5.5.350.0400.07020.47
5.5.340.0070.03717.98
5.5.330.0430.06720.23
5.5.320.0570.05320.23
5.5.310.0400.06020.49
5.5.300.0270.07020.39
5.5.290.0200.05720.24
5.5.280.0170.05720.19
5.5.270.0200.06020.16
5.5.260.0300.05320.20
5.5.250.0200.06020.02
5.5.240.0230.05019.54
5.5.230.0300.05019.59
5.5.220.0300.07019.59
5.5.210.0130.05719.38
5.5.200.0430.04719.57
5.5.190.0270.05719.57
5.5.180.0370.07319.57
5.5.160.0230.05319.52
5.5.150.0230.05719.56
5.5.140.0170.06319.56
5.5.130.0130.05719.56
5.5.120.0270.04719.55
5.5.110.0070.06319.58
5.5.100.0270.05719.27
5.5.90.0170.08019.45
5.5.80.0230.05319.36
5.5.70.0170.05719.44
5.5.60.0200.05719.63
5.5.50.0100.05719.42
5.5.40.0100.05719.50
5.5.30.0100.05719.62
5.5.20.0230.05019.41
5.5.10.0070.06719.47
5.5.00.0330.05019.45

preferences:
33.2 ms | 401 KiB | 5 Q