3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Direction { static $NORTH = 1; static $EAST = 1; static $SOUTH = 1; static $WEST = 1; static $UNKNOWN = PHP_INT_MAX; public function __construct($direction) { $d = 1 << 1; 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)
8.3.60.0060.00918.31
8.3.50.0110.00822.05
8.3.40.0150.00018.84
8.3.30.0040.01118.70
8.3.20.0090.00618.78
8.3.10.0050.00321.04
8.3.00.0110.00823.53
8.2.180.0060.01316.88
8.2.170.0120.00622.96
8.2.160.0130.00020.38
8.2.150.0060.00324.18
8.2.140.0070.01124.66
8.2.130.0070.01026.16
8.2.120.0050.00321.04
8.2.110.0060.00322.17
8.2.100.0080.00417.70
8.2.90.0040.00419.26
8.2.80.0000.00817.97
8.2.70.0130.00217.25
8.2.60.0000.00817.80
8.2.50.0110.00018.07
8.2.40.0000.00818.22
8.2.30.0060.00319.50
8.2.20.0040.00417.64
8.2.10.0050.00317.82
8.2.00.0030.00617.87
8.1.280.0160.00025.92
8.1.270.0040.00423.99
8.1.260.0040.01126.35
8.1.250.0120.00628.09
8.1.240.0090.00922.49
8.1.230.0060.00620.96
8.1.220.0080.00018.77
8.1.210.0080.00018.98
8.1.200.0090.00017.23
8.1.190.0070.00017.63
8.1.180.0040.00418.10
8.1.170.0040.00418.56
8.1.160.0040.00418.89
8.1.150.0000.00718.49
8.1.140.0070.00017.39
8.1.130.0080.00017.79
8.1.120.0070.00017.41
8.1.110.0000.00717.40
8.1.100.0040.00417.44
8.1.90.0070.00017.31
8.1.80.0000.00817.41
8.1.70.0030.00317.38
8.1.60.0060.00317.40
8.1.50.0000.00817.48
8.1.40.0000.00817.37
8.1.30.0090.00017.50
8.1.20.0000.00917.66
8.1.10.0030.00617.51
8.1.00.0060.00317.46
8.0.300.0040.00419.79
8.0.290.0000.00717.18
8.0.280.0030.00318.50
8.0.270.0000.00817.23
8.0.260.0050.00316.96
8.0.250.0000.00717.04
8.0.240.0080.00317.04
8.0.230.0030.00316.99
8.0.220.0050.00316.86
8.0.210.0050.00316.86
8.0.200.0000.00717.01
8.0.190.0030.00516.91
8.0.180.0040.00416.88
8.0.170.0030.00516.97
8.0.160.0030.00316.93
8.0.150.0030.00416.84
8.0.140.0000.00716.93
8.0.130.0060.00013.38
8.0.120.0040.00316.92
8.0.110.0030.00616.85
8.0.100.0000.00716.84
8.0.90.0050.00316.87
8.0.80.0210.00016.91
8.0.70.0030.00716.83
8.0.60.0040.00416.85
8.0.50.0000.00816.95
8.0.30.0140.00617.14
8.0.20.0110.00817.40
8.0.10.0030.00616.94
8.0.00.0090.00916.85
7.4.330.0000.00616.83
7.4.320.0000.00716.47
7.4.300.0030.00316.54
7.4.290.0070.00016.47
7.4.280.0000.00716.59
7.4.270.0040.00416.45
7.4.260.0030.00313.13
7.4.250.0050.00216.54
7.4.240.0000.00716.55
7.4.230.0070.00016.37
7.4.220.0120.01316.52
7.4.210.0030.01216.47
7.4.200.0030.00316.33
7.4.190.0030.00316.61
7.4.160.0070.01016.32
7.4.150.0140.00317.40
7.4.140.0110.00617.86
7.4.130.0080.01116.54
7.4.120.0100.00916.46
7.4.110.0090.00916.35
7.4.100.0140.00716.55
7.4.90.0110.00716.48
7.4.80.0070.01019.39
7.4.70.0140.00716.31
7.4.60.0040.01516.57
7.4.50.0050.00016.55
7.4.40.0000.01022.77
7.4.30.0080.00916.55
7.4.00.0080.00414.95
7.3.330.0050.00013.37
7.3.320.0000.00513.35
7.3.310.0000.00716.20
7.3.300.0040.00316.42
7.3.290.0000.01616.33
7.3.280.0130.00616.33
7.3.270.0100.00717.40
7.3.260.0090.00818.24
7.3.250.0090.01216.56
7.3.240.0090.00816.46
7.3.230.0070.01016.45
7.3.210.0110.00716.32
7.3.200.0090.00619.39
7.3.190.0190.00316.45
7.3.180.0040.01216.57
7.3.170.0060.01516.41
7.3.160.0090.00616.38
7.3.120.0040.01214.67
7.3.110.0030.00914.80
7.3.100.0060.00614.79
7.3.90.0000.01714.80
7.3.80.0070.01014.60
7.3.70.0040.01114.71
7.3.60.0000.01314.90
7.3.50.0090.00314.66
7.3.40.0060.00614.77
7.3.30.0060.00614.62
7.3.20.0120.00316.43
7.3.10.0060.00916.66
7.3.00.0030.01016.63
7.2.330.0170.00716.52
7.2.320.0080.01116.36
7.2.310.0160.00616.33
7.2.300.0000.02016.37
7.2.290.0110.00716.67
7.2.240.0030.00914.58
7.2.230.0070.00714.80
7.2.220.0000.01414.93
7.2.210.0040.00714.77
7.2.200.0000.01214.95
7.2.190.0070.00414.84
7.2.180.0030.01314.73
7.2.170.0100.00314.77
7.2.160.0060.00914.96
7.2.150.0080.00316.88
7.2.140.0070.01016.81
7.2.130.0030.01016.80
7.2.120.0070.00716.82
7.2.110.0110.00016.88
7.2.100.0060.00816.89
7.2.90.0040.01116.75
7.2.80.0030.01116.88
7.2.70.0000.01116.76
7.2.60.0100.00516.82
7.2.50.0060.00916.59
7.2.40.0030.01516.87
7.2.30.0100.00716.88
7.2.20.0140.00316.95
7.2.10.0090.00616.67
7.2.00.0080.00917.85
7.1.330.0000.01015.53
7.1.320.0080.00415.56
7.1.310.0030.00915.39
7.1.300.0070.00715.55
7.1.290.0080.00815.64
7.1.280.0000.01415.63
7.1.270.0030.01315.73
7.1.260.0040.00715.64
7.1.250.0090.00615.38
7.1.200.0090.00315.61
7.1.100.0000.01117.79
7.1.70.0000.00817.01
7.1.60.0040.00817.13
7.1.50.0030.01016.81
7.1.40.0070.00416.63
7.1.30.0030.01016.66
7.1.20.0040.00716.67
7.1.10.0000.00816.63
7.1.00.0030.01416.63
7.0.200.0000.00716.82
7.0.190.0000.00816.66
7.0.180.0000.00816.63
7.0.170.0080.00416.63
7.0.160.0030.01016.63
7.0.150.0070.00016.63
7.0.140.0030.01016.63
7.0.130.0040.00416.74
7.0.120.0030.00516.63
7.0.110.0000.00816.63
7.0.100.0050.00216.63
7.0.90.0000.00916.63
7.0.80.0060.00316.63
7.0.70.0000.01016.63
7.0.60.0040.00416.63
7.0.50.0040.00416.63
7.0.40.0070.00016.63
7.0.30.0000.00716.63
7.0.20.0100.00316.63
7.0.10.0050.00316.63
7.0.00.0030.00616.63
5.6.300.0000.04420.64
5.6.290.0100.03421.00
5.6.280.0000.04321.00
5.6.270.0060.04220.98
5.6.260.0060.03820.89
5.6.250.0000.04721.05
5.6.240.0030.04420.80
5.6.230.0070.04220.98
5.6.220.0100.03720.79
5.6.210.0130.03820.57
5.6.200.0100.08220.96
5.6.190.0070.04020.76
5.6.180.0100.03320.73
5.6.170.0040.04220.80
5.6.160.0060.04220.79
5.6.150.0030.04220.80
5.6.140.0070.07121.00
5.6.130.0000.04421.03
5.6.120.0060.03820.78
5.6.110.0100.04021.04
5.6.100.0000.04720.92
5.6.90.0040.04320.89
5.6.80.0000.04220.42
5.6.70.0070.06520.20
5.6.60.0070.03620.43
5.6.50.0030.04720.21
5.6.40.0030.04020.39
5.6.30.0030.07820.18
5.6.20.0100.05620.41
5.6.10.0030.03820.36
5.6.00.0130.04220.05
5.5.380.0030.04317.52
5.5.370.0030.04017.64
5.5.360.0030.04517.43
5.5.350.0100.04817.50
5.5.340.0030.06317.71
5.5.330.0000.05017.96
5.5.320.0060.03917.84
5.5.310.0000.05417.83
5.5.300.0000.04717.84
5.5.290.0060.03817.83
5.5.280.0070.04717.96
5.5.270.0060.03718.05
5.5.260.0100.03618.06
5.5.250.0030.04217.88
5.5.240.0030.04217.55
5.5.230.0030.04717.44
5.5.220.0100.07317.18
5.5.210.0070.07617.54
5.5.200.0060.03617.06
5.5.190.0100.07417.33
5.5.180.0030.07117.05
5.5.160.0070.03317.39
5.5.150.0000.04117.45
5.5.140.0030.06817.31
5.5.130.0100.05317.15
5.5.120.0040.04317.50
5.5.110.0060.03517.35
5.5.100.0030.07917.27
5.5.90.0070.06417.28
5.5.80.0030.03717.36
5.5.70.0030.03917.32
5.5.60.0000.04417.39
5.5.50.0030.04117.21
5.5.40.0000.04117.39
5.5.30.0070.03717.21
5.5.20.0100.06717.31
5.5.10.0070.03417.28
5.5.00.0030.06017.21
5.4.450.0030.03919.37
5.4.440.0000.04619.36
5.4.430.0030.04119.36
5.4.420.0030.05719.44
5.4.410.0070.03419.35
5.4.400.0000.08518.95
5.4.390.0030.04019.20
5.4.380.0030.04119.07
5.4.370.0030.03919.21
5.4.360.0070.03719.18
5.4.350.0030.06519.20
5.4.340.0000.06519.16
5.4.320.0030.03819.11
5.4.310.0060.03418.86
5.4.300.0030.06319.24
5.4.290.0070.03419.18
5.4.280.0070.06318.88
5.4.270.0030.03919.06
5.4.260.0000.04018.85
5.4.250.0000.06719.05
5.4.240.0070.06118.90
5.4.230.0100.04219.17
5.4.220.0060.03818.84
5.4.210.0030.04118.97
5.4.200.0000.04419.02
5.4.190.0030.03719.04
5.4.180.0100.03018.95
5.4.170.0100.06819.14
5.4.160.0000.04219.18
5.4.150.0070.03419.00
5.4.140.0070.03816.64
5.4.130.0030.03516.64
5.4.120.0070.08016.63
5.4.110.0000.04316.68
5.4.100.0070.03916.63
5.4.90.0000.03916.68
5.4.80.0000.03816.63
5.4.70.0040.03516.63
5.4.60.0040.03516.63
5.4.50.0040.03916.63
5.4.40.0070.03016.69
5.4.30.0030.04016.70
5.4.20.0030.03316.63
5.4.10.0000.04116.63
5.4.00.0030.03916.63
5.3.290.0000.04216.63
5.3.280.0130.02816.63
5.3.270.0030.03716.63
5.3.260.0000.04416.63
5.3.250.0040.03616.63
5.3.240.0070.04516.63
5.3.230.0000.03716.63
5.3.220.0000.05116.63
5.3.210.0000.04316.63
5.3.200.0000.03916.63
5.3.190.0070.03216.63
5.3.180.0000.04116.63
5.3.170.0000.05516.63
5.3.160.0030.03916.63
5.3.150.0000.04516.63
5.3.140.0030.04016.63
5.3.130.0100.03916.63
5.3.120.0070.04316.63
5.3.110.0030.04116.63
5.3.100.0070.03416.63
5.3.90.0030.03716.63
5.3.80.0060.03816.63
5.3.70.0000.04016.63
5.3.60.0000.04016.63
5.3.50.0000.04316.63
5.3.40.0030.03916.63
5.3.30.0030.03716.63
5.3.20.0000.03916.63
5.3.10.0000.04616.63
5.3.00.0170.03716.63
5.2.170.0040.03216.63
5.2.160.0030.03316.63
5.2.150.0060.02816.63
5.2.140.0000.03716.63
5.2.130.0000.03216.63
5.2.120.0030.03316.63
5.2.110.0030.02816.63
5.2.100.0040.02816.63
5.2.90.0000.03116.63
5.2.80.0070.02716.63
5.2.70.0000.03216.63
5.2.60.0060.03116.63
5.2.50.0070.02616.63
5.2.40.0030.03316.63
5.2.30.0000.03216.63
5.2.20.0060.02316.63
5.2.10.0000.03316.63
5.2.00.0030.03016.63
5.1.60.0040.02616.63
5.1.50.0040.02616.63
5.1.40.0000.02716.63
5.1.30.0000.03016.63
5.1.20.0000.03716.63
5.1.10.0030.02516.63
5.1.00.0000.03416.63
5.0.50.0000.02216.63
5.0.40.0000.02416.63
5.0.30.0030.03016.63
5.0.20.0030.02016.63
5.0.10.0030.01816.63
5.0.00.0040.02816.63
4.4.90.0040.01416.63
4.4.80.0160.00616.63
4.4.70.0000.01816.63
4.4.60.0060.01116.63
4.4.50.0000.02116.63
4.4.40.0100.02316.63
4.4.30.0000.01716.63
4.4.20.0040.01416.63
4.4.10.0030.01716.63
4.4.00.0000.02716.63
4.3.110.0070.01316.63
4.3.100.0000.01816.63
4.3.90.0030.01716.63
4.3.80.0030.02416.63
4.3.70.0060.01316.63
4.3.60.0000.01716.63
4.3.50.0000.01816.63
4.3.40.0030.02316.63
4.3.30.0000.01916.63
4.3.20.0000.02116.63
4.3.10.0000.01716.63
4.3.00.0000.01616.63

preferences:
41.44 ms | 401 KiB | 5 Q