3v4l.org

run code in 300+ PHP versions simultaneously
<?php class main{ private $name = "李三"; private function __set($_name,$_val){ $this->$_name=$_val;//当外面直接设置私有成员属性$name的时候被自动调用 } private function __get($_name){ retrun $this->$_name;//当外面直接使用私有成员属性$name的时候被自动调用 } } $my = new main; $my->name="李四";//此时,就调用了__set()魔术方法 echo $my->name;//此时,就调用__get()魔术方法

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)
5.4.340.0000.04318.98
5.4.320.0630.04719.32
5.4.310.1370.03718.98
5.4.300.1900.02719.09
5.4.290.2370.04318.87
5.4.280.2700.03319.19
5.4.270.2600.03719.24
5.4.260.2070.03719.20
5.4.250.2500.03719.19
5.4.240.2770.04719.21
5.4.230.1870.03719.19
5.4.220.2170.03719.07
5.4.210.2470.03319.16
5.4.200.2730.03318.99
5.4.190.1700.03719.10
5.4.180.1700.04318.98
5.4.170.2500.04018.98
5.4.160.2830.03319.01
5.4.150.2200.04019.06
5.4.140.2500.03016.35
5.4.130.2400.03716.56
5.4.120.2430.04016.40
5.4.110.2600.03316.51
5.4.100.2600.03716.61
5.4.90.1970.04016.46
5.4.80.2630.03316.39
5.4.70.2770.03716.40
5.4.60.2830.03716.53
5.4.50.2800.03716.43
5.4.40.2870.04016.56
5.4.30.2830.03716.51
5.4.20.2700.03716.48
5.4.10.2830.04016.42
5.4.00.2770.04015.85
5.3.290.2730.03714.90
5.3.280.3030.04314.64
5.3.270.2800.04314.63
5.3.260.3000.03714.84
5.3.250.2770.03714.66
5.3.240.3000.03714.83
5.3.230.2800.03714.75
5.3.220.2230.03714.48
5.3.210.2770.03314.71
5.3.200.2930.03314.59
5.3.190.2570.04014.56
5.3.180.2870.03314.65
5.3.170.2830.04014.57
5.3.160.2730.03714.81
5.3.150.2700.03714.64
5.3.140.2930.04014.58
5.3.130.2730.04314.52
5.3.120.2600.04014.70
5.3.110.2770.03014.70
5.3.100.2770.03014.27
5.3.90.2800.03713.94
5.3.80.2870.04014.09
5.3.70.2700.03713.93
5.3.60.3070.03714.16
5.3.50.2930.04014.03
5.3.40.2930.03013.95
5.3.30.2870.03014.03
5.3.20.2700.03713.78
5.3.10.2630.03013.88
5.3.00.2900.03013.80
5.2.170.2300.02711.20
5.2.160.2370.02711.05
5.2.150.2300.02711.21
5.2.140.2470.03011.22
5.2.130.2130.03311.02
5.2.120.2570.03311.05
5.2.110.2500.02311.16
5.2.100.2170.03011.16
5.2.90.2470.03011.22
5.2.80.2230.03011.00
5.2.70.2600.03011.01
5.2.60.2430.03011.05
5.2.50.2300.02310.92
5.2.40.1730.03010.91
5.2.30.1770.02310.98
5.2.20.2000.03011.05
5.2.10.2070.03010.95
5.2.00.1230.03310.68
5.1.60.0000.0579.93
5.1.50.0070.06010.15
5.1.40.0000.0309.97
5.1.30.0070.05310.24
5.1.20.0000.03310.58
5.1.10.1900.0239.98
5.1.00.2070.0209.98
5.0.50.1100.0278.43
5.0.40.0870.0208.54
5.0.30.0770.0408.16
5.0.20.1000.0208.36
5.0.10.0930.0238.07
5.0.00.0030.0378.04
4.4.90.0000.0176.69
4.4.80.0070.0136.69
4.4.70.0030.0176.69
4.4.60.0000.0236.69
4.4.50.0030.0236.69
4.4.40.0000.0306.69
4.4.30.0030.0176.69
4.4.20.0000.0406.69
4.4.10.0030.0306.69
4.4.00.0630.0276.69
4.3.110.0900.0176.69
4.3.100.1130.0136.69
4.3.90.0930.0136.69
4.3.80.0830.0306.69
4.3.70.0000.0276.69
4.3.60.0030.0136.69
4.3.50.0000.0176.69
4.3.40.0070.0176.69
4.3.30.0000.0336.69
4.3.20.0000.0276.69
4.3.10.0000.0176.69
4.3.00.0000.0136.69

preferences:
158.58 ms | 1005 KiB | 7 Q