3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'bar'; } $foo = new Foo; $rounds = 1000000; $start = microtime(true); for($i=0; $i<$rounds; $i++) { $var = $foo->bar; } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); $refl = new ReflectionProperty('Foo', 'bar'); for($i=0; $i<$rounds; $i++) { $var = $refl->getValue($foo); } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); for($i=0; $i<$rounds; $i++) { $refl = new ReflectionProperty('Foo', 'bar'); $var = $refl->getValue($foo); } echo (microtime(true) - $start);

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)
7.4.00.0100.38914.77
7.3.120.0100.74914.74
7.3.110.0100.55614.95
7.3.100.0070.51214.91
7.3.90.0100.41914.61
7.3.80.0030.52814.48
7.3.70.0070.47814.85
7.3.60.0070.52514.93
7.3.50.0030.71914.89
7.3.40.0060.46314.93
7.3.30.0030.72914.57
7.3.20.0100.55316.54
7.3.10.0070.64716.60
7.3.00.0070.45716.83
7.2.250.0100.87315.27
7.2.240.0031.06015.34
7.2.230.0070.97614.79
7.2.220.0000.98415.16
7.2.210.0101.18515.10
7.2.200.0070.86215.02
7.2.190.0030.90215.18
7.2.180.0030.99015.04
7.2.170.0030.98415.20
7.2.00.0030.57219.63
7.1.330.0071.08915.89
7.1.320.0071.13715.89
7.1.310.0031.16615.87
7.1.300.0001.21115.94
7.1.290.0031.04216.01
7.1.280.0101.21415.98
7.1.270.0001.05615.86
7.1.260.0031.05415.68
7.1.70.0100.47917.35
7.1.60.0170.55419.31
7.1.50.0270.56216.70
7.1.00.0030.60322.35
7.0.200.0070.67716.59
7.0.140.0070.74722.05
7.0.80.0630.54319.90
7.0.70.0570.59719.89
7.0.60.0400.51320.00
7.0.50.0700.50020.38
7.0.40.0070.52319.95
7.0.30.0070.57020.10
7.0.20.0100.68320.03
7.0.10.0100.69020.01
7.0.00.0030.67320.02
5.6.280.0070.99321.15
5.6.230.0171.00720.75
5.6.220.0171.04720.62
5.6.210.0171.02720.65
5.6.200.0101.03021.18
5.6.190.0070.90720.95
5.6.180.0030.91020.95
5.6.170.0101.05021.05
5.6.160.0071.02721.03
5.6.150.0500.81720.99
5.6.140.0071.03021.03
5.6.130.0030.88721.11
5.6.120.0130.88721.11
5.6.110.0030.80020.93
5.6.100.0030.87720.94
5.6.90.0131.03721.04
5.6.80.0070.96320.50
5.6.70.0071.04320.43
5.6.60.0131.08320.38
5.6.50.0031.01320.41
5.6.40.0101.02020.49
5.6.30.0101.14020.48
5.6.20.0130.97720.38
5.6.10.0000.85720.49
5.6.00.0070.86020.37
5.5.370.0031.08020.55
5.5.360.0071.02720.39
5.5.350.0171.03720.34
5.5.340.0071.13720.80
5.5.330.0101.05020.91
5.5.320.0131.06020.87
5.5.310.0131.05020.89
5.5.300.0600.88320.92
5.5.290.0070.87320.89
5.5.280.0031.04720.88
5.5.270.0100.87720.88
5.5.260.0131.07720.87
5.5.250.0171.10320.68
5.5.240.0101.06320.18
5.5.230.0771.00720.29
5.5.220.0071.05320.17
5.5.210.0031.06020.29
5.5.200.0131.02020.12
5.5.190.0101.03320.29
5.5.180.0800.95020.25
5.5.160.0000.86020.23
5.5.150.0071.10320.21
5.5.140.0030.87319.99
5.5.130.0171.09020.12
5.5.120.0171.03320.24
5.5.110.0030.84019.95
5.5.100.0030.97720.16
5.5.90.0030.85720.10
5.5.80.0001.04720.11
5.5.70.0101.02320.16
5.5.60.0000.86020.00
5.5.50.0030.90719.96
5.5.40.0131.01020.05
5.5.30.0071.06020.05
5.5.20.0001.05020.13
5.5.10.0000.88020.02
5.5.00.0101.05719.97
5.4.450.0100.87719.54
5.4.440.0070.80319.48
5.4.430.0100.80719.26
5.4.420.0170.91019.45
5.4.410.0101.10019.23
5.4.400.0131.04318.98
5.4.390.0071.02018.95
5.4.380.0070.93719.12
5.4.370.0071.05019.05
5.4.360.0101.03319.16
5.4.350.0701.03019.14
5.4.340.0071.03019.05
5.4.320.0000.83018.95
5.4.310.0000.83318.87
5.4.300.0030.86019.13
5.4.290.0030.80318.84
5.4.280.0101.02019.18
5.4.270.0070.91019.04
5.4.260.0071.05019.16
5.4.250.0000.86719.12
5.4.240.0030.80019.23
5.4.230.0101.00719.15
5.4.220.0030.84319.21
5.4.210.0100.85019.04
5.4.200.0070.97319.12
5.4.190.0031.04319.02
5.4.180.0000.79718.83
5.4.170.0131.02019.12
5.4.160.0070.82719.10
5.4.150.0000.91318.86
5.4.140.0101.05316.46
5.4.130.0000.84716.40
5.4.120.0030.83716.41
5.4.110.0070.82316.43
5.4.100.0131.03716.39
5.4.90.0101.03016.39
5.4.80.0071.01316.38
5.4.70.0071.08016.38
5.4.60.0030.86016.32
5.4.50.0000.99716.41
5.4.40.0071.03716.46
5.4.30.0031.07716.36
5.4.20.0001.01716.31
5.4.10.0070.89716.44
5.4.00.0000.95715.85
5.3.290.0101.13014.68
5.3.280.0131.05314.73
5.3.270.0001.03714.54
5.3.260.0071.23714.54
5.3.250.0031.22714.62
5.3.240.0031.21314.75
5.3.230.0001.06014.62
5.3.220.0101.04714.68
5.3.210.0031.24314.60
5.3.200.0031.10014.63
5.3.190.0001.20714.64
5.3.180.0031.26014.59
5.3.170.0071.03714.52
5.3.160.0031.05714.71
5.3.150.0071.05314.63
5.3.140.0031.24714.68
5.3.130.0131.19314.61
5.3.120.0101.22014.58
5.3.110.0031.06314.57
5.3.100.0031.26314.03
5.3.90.0071.04714.13
5.3.80.0071.06013.91
5.3.70.0071.19014.16
5.3.60.0101.20714.00
5.3.50.0071.01313.93
5.3.40.0031.20713.88
5.3.30.0101.25313.97
5.3.20.0100.95713.69
5.3.10.0031.23313.78
5.3.00.0071.23013.57
5.2.170.0101.13711.68
5.2.160.0031.24011.68
5.2.150.0031.03011.68
5.2.140.0101.18311.68
5.2.130.0031.25711.68
5.2.120.0031.13711.68
5.2.110.0031.01711.68
5.2.100.0000.99311.68
5.2.90.0001.30711.68
5.2.80.0001.21311.68
5.2.70.0801.06711.68
5.2.60.0001.21011.68
5.2.50.0031.01711.68
5.2.40.0031.18711.68
5.2.30.0031.22311.68
5.2.20.0071.22711.68
5.2.10.0131.13311.68
5.2.00.0131.19711.68
5.1.60.0000.83711.68
5.1.50.0070.88011.68
5.1.40.0030.85711.68
5.1.30.0030.82011.68
5.1.20.0101.06011.68
5.1.10.0031.03311.68
5.1.00.0031.02311.68
5.0.50.0001.39711.68
5.0.40.0001.50311.68
5.0.30.0001.25711.68
5.0.20.0001.40311.68
5.0.10.0031.36711.68
5.0.00.0101.47011.68
4.4.90.0030.03711.68
4.4.80.0000.02011.68
4.4.70.0030.03011.68
4.4.60.0030.03311.68
4.4.50.0030.03311.68
4.4.40.0000.05311.68
4.4.30.0000.02011.68
4.4.20.0000.03711.68
4.4.10.0030.03711.68
4.4.00.0000.02011.68
4.3.110.0000.04011.68
4.3.100.0000.02311.68
4.3.90.0070.03011.68
4.3.80.0000.05711.68
4.3.70.0030.03311.68
4.3.60.0070.03311.68
4.3.50.0000.03711.68
4.3.40.0070.04311.68
4.3.30.0100.02311.68
4.3.20.0000.03711.68
4.3.10.0000.04011.68
4.3.00.0070.02711.68

preferences:
33.14 ms | 401 KiB | 5 Q