3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Baz { protected $foo; protected $bar; } class Proxy { private $realObj; public function __construct($realObj) { $this->realObj = $realObj; } public function extract(array $data = array()) { foreach ($data as $key => $val) { if (property_exists($this->realObj, $key)) { die('Yes'); $this->$key = $val; } } //return $this; } } $data = array('foo' => 'bar'); $baz = new Baz; $proxy = new Proxy($baz); var_dump($proxy->extract($data));

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.0200.00018.24
8.3.50.0140.00222.10
8.3.40.0070.01119.00
8.3.30.0120.00319.09
8.3.20.0070.00020.07
8.3.10.0040.00423.54
8.3.00.0050.00320.89
8.2.180.0150.00616.50
8.2.170.0110.00422.96
8.2.160.0070.00720.39
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0030.01026.16
8.2.120.0060.00319.36
8.2.110.0050.00522.11
8.2.100.0100.00020.52
8.2.90.0090.00019.04
8.2.80.0030.00617.97
8.2.70.0070.00317.75
8.2.60.0030.00618.04
8.2.50.0090.00018.07
8.2.40.0000.00819.95
8.2.30.0050.00218.12
8.2.20.0090.00017.79
8.2.10.0000.00718.13
8.2.00.0080.00017.80
8.1.280.0100.00725.92
8.1.270.0060.00323.67
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0090.00023.86
8.1.230.0040.00819.18
8.1.220.0090.00017.74
8.1.210.0030.00518.77
8.1.200.0040.00417.47
8.1.190.0000.00917.36
8.1.180.0080.00018.10
8.1.170.0050.00318.65
8.1.160.0040.00422.00
8.1.150.0040.00418.54
8.1.140.0000.00717.37
8.1.130.0000.00717.87
8.1.120.0050.00217.37
8.1.110.0000.00817.46
8.1.100.0040.00417.36
8.1.90.0000.00817.44
8.1.80.0040.00417.35
8.1.70.0000.00717.38
8.1.60.0030.00617.60
8.1.50.0040.00417.41
8.1.40.0000.00817.38
8.1.30.0030.00617.53
8.1.20.0040.00417.58
8.1.10.0040.00417.45
8.1.00.0020.00517.53
8.0.300.0000.00818.77
8.0.290.0040.00416.88
8.0.280.0000.00718.34
8.0.270.0030.00317.26
8.0.260.0060.00017.25
8.0.250.0070.00017.06
8.0.240.0050.00216.96
8.0.230.0000.00816.89
8.0.220.0030.00316.84
8.0.210.0040.00416.90
8.0.200.0000.00616.93
8.0.190.0030.00317.05
8.0.180.0000.00717.00
8.0.170.0040.00416.88
8.0.160.0030.00316.94
8.0.150.0000.00716.90
8.0.140.0000.00716.84
8.0.130.0000.00713.38
8.0.120.0000.00816.82
8.0.110.0040.00416.86
8.0.100.0000.00716.90
8.0.90.0000.00816.80
8.0.80.0060.01316.93
8.0.70.0000.00716.75
8.0.60.0040.00416.82
8.0.50.0040.00416.89
8.0.30.0150.00817.20
8.0.20.0100.00817.40
8.0.10.0080.00016.89
8.0.00.0120.00716.77
7.4.330.0000.00615.00
7.4.320.0030.00316.58
7.4.300.0000.00616.54
7.4.290.0040.00416.50
7.4.280.0000.00716.40
7.4.270.0000.00716.40
7.4.260.0050.00316.48
7.4.250.0070.00016.55
7.4.240.0050.00216.56
7.4.230.0070.00016.50
7.4.220.0070.01116.46
7.4.210.0000.01616.63
7.4.200.0000.00816.42
7.4.160.0100.00716.50
7.4.150.0060.01217.40
7.4.140.0080.00917.86
7.4.130.0080.01216.64
7.4.120.0120.00916.45
7.4.110.0030.01316.46
7.4.100.0120.00616.54
7.4.90.0130.00916.56
7.4.80.0180.00619.39
7.4.70.0000.01616.65
7.4.60.0090.00616.65
7.4.50.0050.00316.41
7.4.40.0100.00716.38
7.4.30.0110.00816.50
7.4.00.0060.01014.98
7.3.330.0030.00313.23
7.3.320.0070.00013.32
7.3.310.0000.00716.22
7.3.300.0030.00316.24
7.3.290.0030.01016.35
7.3.280.0090.00916.29
7.3.270.0100.00717.40
7.3.260.0140.00316.28
7.3.250.0080.01316.58
7.3.240.0060.01116.64
7.3.230.0170.00016.64
7.3.210.0100.00716.52
7.3.200.0120.00919.39
7.3.190.0170.00516.31
7.3.180.0070.00716.36
7.3.170.0060.00916.39
7.3.160.0100.01016.50
7.3.120.0100.00715.04
7.2.330.0040.01416.64
7.2.320.0130.00416.73
7.2.310.0150.00316.48
7.2.300.0030.01416.79
7.2.290.0040.01216.93
7.2.60.0120.00616.64
7.2.00.0000.01419.48
7.1.200.0120.00015.46
7.1.100.0030.01318.02
7.1.70.0000.01617.02
7.1.60.0080.00819.70
7.1.50.0090.01517.04
7.1.00.0070.07322.51
7.0.200.0000.00816.83
7.0.140.0030.07322.00
7.0.80.0600.07319.93
7.0.70.0530.05320.02
7.0.60.0570.08319.78
7.0.50.0530.08320.39
7.0.40.0130.05320.10
7.0.30.0000.07020.05
7.0.20.0130.07320.10
7.0.10.0070.08019.98
7.0.00.0070.08020.08
5.6.280.0030.07021.03
5.6.230.0030.09020.59
5.6.220.0100.05720.65
5.6.210.0070.04720.69
5.6.200.0070.04021.00
5.6.190.0030.08321.02
5.6.180.0100.07321.05
5.6.170.0100.07321.03
5.6.160.0070.05321.06
5.6.150.0130.07720.94
5.6.140.0070.08021.04
5.6.130.0200.07321.03
5.6.120.0130.08020.96
5.6.110.0070.07721.01
5.6.100.0170.07020.92
5.6.90.0030.08721.01
5.6.80.0000.08020.48
5.6.70.0070.04720.45
5.6.60.0200.07020.55
5.6.50.0100.08020.41
5.6.40.0100.04020.53
5.6.30.0000.06020.54
5.6.20.0170.07020.42
5.6.10.0100.08020.44
5.6.00.0100.07720.31
5.5.370.0170.06020.46
5.5.360.0070.05020.37
5.5.350.0000.08020.47
5.5.340.0030.08020.81
5.5.330.0130.06320.90
5.5.320.0030.04720.91
5.5.310.0070.04720.82
5.5.300.0100.08720.89
5.5.290.0130.06020.80
5.5.280.0070.04720.78
5.5.270.0030.05020.89
5.5.260.0130.08020.92
5.5.250.0130.07720.59
5.5.240.0070.08720.30
5.5.230.0000.05020.26
5.5.220.0100.07720.26
5.5.210.0070.05320.16
5.5.200.0000.05020.20
5.5.190.0100.07019.98
5.5.180.0030.08320.00
5.5.160.0130.06720.09
5.5.150.0000.07320.15
5.5.140.0000.07019.96
5.5.130.0030.08320.00
5.5.120.0070.03720.27
5.5.110.0100.06020.18
5.5.100.0070.07720.08
5.5.90.0100.07720.01
5.5.80.0100.08020.10
5.5.70.0130.07720.14
5.5.60.0100.05020.06
5.5.50.0030.07720.06
5.5.40.0170.05720.14
5.5.30.0100.07720.00
5.5.20.0170.07020.14
5.5.10.0070.06720.08
5.5.00.0030.04720.13
5.4.450.0030.07019.58
5.4.440.0070.08019.35
5.4.430.0100.07319.22
5.4.420.0100.04319.55
5.4.410.0070.06319.32
5.4.400.0170.07018.95
5.4.390.0000.04318.85
5.4.380.0130.07319.18
5.4.370.0100.07019.13
5.4.360.0030.05719.18
5.4.350.0030.07718.95
5.4.340.0100.07319.05
5.4.320.0100.07019.21
5.4.310.0030.06018.85
5.4.300.0100.06319.04
5.4.290.0000.08019.20
5.4.280.0200.04719.23
5.4.270.0100.07319.21
5.4.260.0000.06319.20
5.4.250.0100.07319.04
5.4.240.0170.06019.12
5.4.230.0130.06319.22
5.4.220.0030.04018.94
5.4.210.0000.08319.11
5.4.200.0070.07319.12
5.4.190.0070.07719.04
5.4.180.0130.06019.17
5.4.170.0000.05318.95
5.4.160.0030.08019.05
5.4.150.0070.07718.88
5.4.140.0130.05716.51
5.4.130.0000.07316.38
5.4.120.0030.07716.48
5.4.110.0100.06316.33
5.4.100.0070.04016.41
5.4.90.0030.03716.50
5.4.80.0130.03716.31
5.4.70.0130.03016.41
5.4.60.0070.03716.32
5.4.50.0070.03016.30
5.4.40.0000.04016.37
5.4.30.0070.03316.24
5.4.20.0030.04716.29
5.4.10.0070.03316.39
5.4.00.0000.05715.88
5.3.290.0000.08014.60
5.3.280.0030.06714.57
5.3.270.0100.06714.59
5.3.260.0030.03714.63
5.3.250.0100.03314.75
5.3.240.0070.04314.64
5.3.230.0130.05014.58
5.3.220.0130.04014.50
5.3.210.0000.04314.71
5.3.200.0030.03714.71
5.3.190.0070.03314.50
5.3.180.0030.04714.55
5.3.170.0100.03314.57
5.3.160.0000.04014.59
5.3.150.0000.04014.50
5.3.140.0070.03314.53
5.3.130.0070.03314.61
5.3.120.0000.03714.58
5.3.110.0000.04014.70
5.3.100.0070.07014.10
5.3.90.0000.03313.96
5.3.80.0100.05314.05
5.3.70.0000.05014.08
5.3.60.0070.03314.12
5.3.50.0030.03314.09
5.3.40.0000.03713.99
5.3.30.0030.03713.83
5.3.20.0030.03313.61
5.3.10.0070.03013.80
5.3.00.0000.03713.66
5.2.170.0000.03013.56
5.2.160.0030.02713.56
5.2.150.0100.02013.56
5.2.140.0030.03313.56
5.2.130.0000.03013.56
5.2.120.0000.03013.56
5.2.110.0030.05013.56
5.2.100.0000.06013.56
5.2.90.0000.03013.56
5.2.80.0000.03013.56
5.2.70.0000.03013.56
5.2.60.0000.02713.56
5.2.50.0030.02713.56
5.2.40.0070.02013.56
5.2.30.0030.04313.56
5.2.20.0000.03013.56
5.2.10.0070.02313.56
5.2.00.0030.02713.56
5.1.60.0070.01713.56
5.1.50.0070.02013.56
5.1.40.0000.02713.56
5.1.30.0000.02713.56
5.1.20.0030.02313.56
5.1.10.0030.02313.56
5.1.00.0070.02013.56
5.0.50.0000.02313.56
5.0.40.0000.02313.56
5.0.30.0030.03013.56
5.0.20.0030.01313.56
5.0.10.0000.01713.56
5.0.00.0030.03013.56
4.4.90.0000.01313.56
4.4.80.0000.01713.56
4.4.70.0030.01313.56
4.4.60.0000.03013.56
4.4.50.0030.01713.56
4.4.40.0000.02713.56
4.4.30.0000.01713.56
4.4.20.0070.01013.56
4.4.10.0030.02713.56
4.4.00.0000.02713.56
4.3.110.0000.01313.56
4.3.100.0070.03013.56
4.3.90.0000.01313.56
4.3.80.0000.02313.56
4.3.70.0030.01313.56
4.3.60.0000.01713.56
4.3.50.0030.01713.56
4.3.40.0070.02713.56
4.3.30.0000.02713.56
4.3.20.0000.02313.56
4.3.10.0000.01713.56
4.3.00.0030.01013.56

preferences:
46.6 ms | 400 KiB | 5 Q