3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TimePeriod { private $Seconds; // Properties accessors are implemented just like you would define an actual property public $Hours { get() { return $this->Seconds / 3600; } // In the set accessor, the variable $x holds the incoming value to be "set" set($x) { $this->Seconds = $x * 3600; } }; } // Accessing the property is the same as accessing a class member $time = new TimePeriod(); $time->Hours = 12; // Stored as 43200 echo $time->Hours; // Outputs 12

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.210.0070.03512.38
5.4.200.0130.04712.38
5.4.190.0170.05212.38
5.4.180.0120.04312.37
5.4.170.0120.03912.38
5.4.160.0120.03912.38
5.4.150.0100.04412.37
5.4.140.0180.06012.06
5.4.130.0100.04212.04
5.4.120.0110.04112.01
5.4.110.0100.04512.01
5.4.100.0090.04312.01
5.4.90.0070.04512.00
5.4.80.0090.04112.01
5.4.70.0100.04812.00
5.4.60.0120.03712.00
5.4.50.0090.04112.00
5.4.40.0090.04312.00
5.4.30.0100.04411.99
5.4.20.0110.05111.98
5.4.10.0130.04111.99
5.4.00.0100.04111.48
5.3.270.0130.04512.72
5.3.260.0110.04512.72
5.3.250.0120.04212.72
5.3.240.0100.04512.72
5.3.230.0150.06112.71
5.3.220.0090.04812.68
5.3.210.0110.04112.68
5.3.200.0090.04112.68
5.3.190.0110.04012.68
5.3.180.0110.04012.67
5.3.170.0110.04012.67
5.3.160.0090.04112.67
5.3.150.0100.04512.67
5.3.140.0160.05312.66
5.3.130.0140.03912.66
5.3.120.0100.04112.66
5.3.110.0110.05212.66
5.3.100.0090.04312.12
5.3.90.0140.05012.09
5.3.80.0100.04112.08
5.3.70.0110.04012.08
5.3.60.0120.03912.07
5.3.50.0120.04212.01
5.3.40.0110.04812.01
5.3.30.0090.04311.96
5.3.20.0110.04011.74
5.3.10.0130.03811.70
5.3.00.0110.04011.69

preferences:
141.22 ms | 1394 KiB | 7 Q