3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Direction { static NORTH = 1<<1; static EAST = 1<<2; static SOUTH = 1<<3; static WEST = 1<<4; static UNKNOWN = PHP_INT_MAX; public function __construct($direction) { switch ($direction) { case (Direction::NORTH): echo "North"; break; case (Direction::EAST): echo "East"; break; case (Direction::SOUTH): echo "South"; break; case (Direction::WEST): echo "West"; break; case (Direction::UNKNOWN): echo "Unknown"; break; default: echo "No Match"; break; } } } $d = new Direction(Direction::NORTH);

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.170.0130.04512.38
5.4.160.0210.06912.37
5.4.150.0150.04512.37
5.4.140.0140.04612.06
5.4.130.0150.04512.04
5.4.120.0230.05012.00
5.4.110.0190.03812.00
5.4.100.0150.04512.00
5.4.90.0250.06412.00
5.4.80.0160.04112.00
5.4.70.0180.04112.00
5.4.60.0140.04211.99
5.4.50.0200.05312.00
5.4.40.0170.05511.98
5.4.30.0140.04311.98
5.4.20.0180.03911.97
5.4.10.0170.03911.98
5.4.00.0150.04311.47
5.3.270.0270.06712.72
5.3.260.0170.04612.72
5.3.250.0190.05612.72
5.3.240.0170.04312.72
5.3.230.0150.04612.71
5.3.220.0170.04212.68
5.3.210.0200.05612.68
5.3.200.0130.04612.68
5.3.190.0190.04212.68
5.3.180.0210.06812.67
5.3.170.0130.04612.67
5.3.160.0180.04212.68
5.3.150.0140.04512.67
5.3.140.0200.03912.66
5.3.130.0140.04512.66
5.3.120.0140.04612.66
5.3.110.0160.04312.65
5.3.100.0160.04312.12
5.3.90.0280.06012.08
5.3.80.0140.04512.08
5.3.70.0150.04312.07
5.3.60.0140.04712.06
5.3.50.0140.04512.00
5.3.40.0140.04512.02
5.3.30.0190.04311.97
5.3.20.0160.04311.76
5.3.10.0140.04211.71
5.3.00.0150.04111.70

preferences:
140.99 ms | 1394 KiB | 7 Q