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); var_Dump($obj['date']);

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.75
8.3.50.0140.00522.11
8.3.40.0100.00718.93
8.3.30.0110.00418.84
8.3.20.0040.00420.16
8.3.10.0070.00021.73
8.3.00.0030.00520.80
8.2.180.0180.00418.54
8.2.170.0070.00722.96
8.2.160.0150.00619.16
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00722.11
8.2.120.0070.00726.35
8.2.110.0030.00620.46
8.2.100.0130.00317.93
8.2.90.0040.00419.36
8.2.80.0050.00317.97
8.2.70.0030.00717.50
8.2.60.0040.00418.16
8.2.50.0040.00418.10
8.2.40.0040.00420.59
8.2.30.0000.00720.70
8.2.20.0060.00317.78
8.2.10.0000.00718.13
8.2.00.0000.00818.06
8.1.280.0060.01225.92
8.1.270.0080.00023.96
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0030.00722.50
8.1.230.0060.00617.77
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0060.00317.36
8.1.190.0000.00816.99
8.1.180.0090.00018.10
8.1.170.0030.00518.56
8.1.160.0000.00820.94
8.1.150.0030.00518.80
8.1.140.0000.00719.63
8.1.130.0000.00817.60
8.1.120.0040.00417.38
8.1.110.0000.00717.23
8.1.100.0050.00217.33
8.1.90.0000.00817.39
8.1.80.0060.00317.37
8.1.70.0020.00517.38
8.1.60.0030.00617.52
8.1.50.0030.00517.54
8.1.40.0000.00817.56
8.1.30.0040.00417.53
8.1.20.0040.00417.73
8.1.10.0070.00017.54
8.1.00.0040.00417.53
8.0.300.0080.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00718.49
8.0.270.0020.00517.22
8.0.260.0000.00717.22
8.0.250.0070.00016.99
8.0.240.0000.00916.80
8.0.230.0030.00317.02
8.0.220.0000.00816.80
8.0.210.0000.00716.80
8.0.200.0000.00817.00
8.0.190.0050.00317.02
8.0.180.0030.00516.94
8.0.170.0000.00716.98
8.0.160.0070.00016.92
8.0.150.0000.00816.83
8.0.140.0030.00616.82
8.0.130.0000.00513.35
8.0.120.0040.00416.78
8.0.110.0040.00416.83
8.0.100.0070.00016.79
8.0.90.0020.00516.87
8.0.80.0090.01016.94
8.0.70.0040.00416.89
8.0.60.0000.00716.87
8.0.50.0040.00416.73
8.0.30.0140.00617.06
8.0.20.0140.00517.40
8.0.10.0040.00417.08
8.0.00.0070.01116.84
7.4.330.0000.00515.08
7.4.320.0000.00616.43
7.4.300.0060.00016.49
7.4.290.0030.00516.58
7.4.280.0040.00416.48
7.4.270.0000.00816.52
7.4.260.0040.00416.48
7.4.250.0040.00416.46
7.4.240.0000.00716.42
7.4.230.0040.00416.54
7.4.220.0100.01016.58
7.4.210.0080.01016.65
7.4.200.0000.00716.60
7.4.160.0120.00916.48
7.4.150.0110.00717.40
7.4.140.0100.01017.86
7.4.130.0100.00816.45
7.4.120.0030.01416.46
7.4.110.0080.00816.53
7.4.100.0120.01116.63
7.4.90.0070.01016.52
7.4.80.0090.00919.39
7.4.70.0110.00516.59
7.4.60.0100.00716.46
7.4.50.0040.01416.36
7.4.40.0110.01116.59
7.4.30.0090.00816.66
7.4.00.0090.00615.23
7.3.330.0000.00513.51
7.3.320.0060.00013.42
7.3.310.0000.00716.32
7.3.300.0030.00316.49
7.3.290.0030.00316.42
7.3.280.0130.00316.40
7.3.270.0040.01217.40
7.3.260.0060.01116.49
7.3.250.0130.00816.42
7.3.240.0090.00916.38
7.3.230.0040.01216.40
7.3.210.0110.01116.36
7.3.200.0070.01716.57
7.3.190.0170.00016.39
7.3.180.0100.01016.39
7.3.170.0090.00916.51
7.3.160.0100.00616.46
7.2.330.0040.01616.81
7.2.320.0100.00716.86
7.2.310.0110.00616.82
7.2.300.0060.01216.59
7.2.290.0100.00616.85
7.2.60.0050.00516.88
7.1.200.0030.00715.92
7.1.100.0000.01218.09
7.1.70.0030.00517.18
7.1.60.0090.01519.48
7.1.50.0070.01417.11
7.1.00.0000.08022.36
7.0.200.0060.00614.63
7.0.60.0030.03321.83
7.0.50.0030.04017.89
7.0.40.0200.05020.07
7.0.30.0430.06020.29
7.0.20.0400.06320.06
7.0.10.0370.06720.40
7.0.00.0430.06020.30
5.6.280.0030.07720.92
5.6.210.0070.08320.71
5.6.200.0130.07318.15
5.6.190.0170.05720.44
5.6.180.0470.04720.48
5.6.170.0470.05320.59
5.6.160.0330.05720.46
5.6.150.0100.05720.33
5.6.140.0470.05720.40
5.6.130.0330.06320.43
5.6.120.0170.05720.40
5.6.110.0300.04020.42
5.6.100.0200.06020.58
5.6.90.0400.06720.25
5.6.80.0500.06319.83
5.6.70.0330.05319.77
5.6.60.0470.07019.77
5.6.50.0400.06019.72
5.6.40.0400.06019.68
5.6.30.0400.07019.79
5.6.20.0330.05719.63
5.6.10.0530.05319.76
5.6.00.0530.05319.55
5.5.350.0100.04020.40
5.5.340.0100.05317.99
5.5.330.0230.06720.50
5.5.320.0370.06320.46
5.5.310.0430.05320.39
5.5.300.0400.05320.39
5.5.290.0270.06720.39
5.5.280.0200.06020.16
5.5.270.0030.06720.21
5.5.260.0470.05020.16
5.5.250.0470.05719.96
5.5.240.0400.05319.56
5.5.230.0330.06019.63
5.5.220.0530.05319.55
5.5.210.0370.06019.57
5.5.200.0500.04719.50
5.5.190.0500.05319.57
5.5.180.0400.05019.55
5.5.160.0600.05719.46
5.5.150.0600.06019.56
5.5.140.0330.06019.56
5.5.130.0400.06019.48
5.5.120.0500.05719.35
5.5.110.0400.06019.55
5.5.100.0400.05019.49
5.5.90.0500.06319.64
5.5.80.0430.04719.42
5.5.70.0470.06019.46
5.5.60.0370.05319.43
5.5.50.0530.04019.45
5.5.40.0400.04719.41
5.5.30.0300.05719.40
5.5.20.0300.06019.38
5.5.10.0470.04719.38
5.5.00.0430.05719.45

preferences:
57.34 ms | 401 KiB | 5 Q