3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v="red,yellow"; switch($v){ case "blue" : echo "your color is blue"; break; case "green": echo "your color is green"; break; case "yellow": echo "your color is yellow"; break; default: echo "you have no color";

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.320.0330.06319.22
5.4.310.0200.04719.13
5.4.300.0230.06719.15
5.4.290.0200.06719.02
5.4.280.0230.06018.90
5.4.270.0270.07018.92
5.4.260.0170.07319.22
5.4.250.0200.08019.23
5.4.240.0230.07019.23
5.4.230.0370.03719.08
5.4.220.0270.06719.13
5.4.210.0270.06719.08
5.4.200.0200.06019.16
5.4.190.0230.03719.23
5.4.180.0270.06719.09
5.4.170.0270.07319.21
5.4.160.0270.07018.77
5.4.150.0230.07018.91
5.4.140.0200.06016.34
5.4.130.0230.06716.25
5.4.120.0200.04716.26
5.4.110.0230.07016.39
5.4.100.0200.05316.34
5.4.90.0170.05316.34
5.4.80.0270.06016.41
5.4.70.0270.05316.29
5.4.60.0270.05316.48
5.4.50.0170.05016.45
5.4.40.0200.07316.42
5.4.30.0170.07716.36
5.4.20.0230.03016.38
5.4.10.0200.03716.39
5.4.00.0330.06015.80
5.3.290.0270.04314.61
5.3.280.0170.06314.45
5.3.270.0200.08014.51
5.3.260.0230.06314.46
5.3.250.0300.04714.48
5.3.240.0230.05714.45
5.3.230.0130.05014.55
5.3.220.0270.04014.66
5.3.210.0230.04314.43
5.3.200.0230.07014.66
5.3.190.0070.06014.52
5.3.180.0270.06714.61
5.3.170.0230.06714.42
5.3.160.0170.05014.44
5.3.150.0170.03714.40
5.3.140.0230.07314.44
5.3.130.0270.06014.50
5.3.120.0300.04714.64
5.3.110.0170.04714.59
5.3.100.0270.06013.88
5.3.90.0170.05314.11
5.3.80.0370.05013.97
5.3.70.0270.06713.97
5.3.60.0200.07713.96
5.3.50.0300.06714.00
5.3.40.0300.06314.04
5.3.30.0200.03314.00
5.3.20.0270.06713.65
5.3.10.0170.07713.50
5.3.00.0130.03713.63
5.2.170.0170.06012.10
5.2.160.0170.04712.10
5.2.150.0170.03012.10
5.2.140.0270.05712.10
5.2.130.0130.04712.10
5.2.120.0200.05312.10
5.2.110.0170.06012.10
5.2.100.0070.03312.10
5.2.90.0170.06012.10
5.2.80.0230.05312.10
5.2.70.0300.05312.10
5.2.60.0130.06312.10
5.2.50.0200.06012.10
5.2.40.0170.05312.10
5.2.30.0130.05012.10
5.2.20.0170.04712.10
5.2.10.0170.05712.10
5.2.00.0170.06012.10
5.1.60.0130.05312.10
5.1.50.0130.05712.10
5.1.40.0170.03712.10
5.1.30.0170.04712.10
5.1.20.0100.03312.10
5.1.10.0200.02012.10
5.1.00.0130.02312.10
5.0.50.0070.02012.10
5.0.40.0030.02312.10
5.0.30.0030.03712.10
5.0.20.0100.01312.10
5.0.10.0100.01712.10
5.0.00.0070.02712.10
4.4.90.0070.02712.10
4.4.80.0130.03012.10
4.4.70.0130.02012.10
4.4.60.0030.02012.10
4.4.50.0070.02012.10
4.4.40.0130.05012.10
4.4.30.0070.03312.10
4.4.20.0170.02312.10
4.4.10.0100.01712.10
4.4.00.0070.02312.10
4.3.110.0030.02012.10
4.3.100.0030.01712.10
4.3.90.0000.02012.10
4.3.80.0030.02712.10
4.3.70.0070.01312.10
4.3.60.0030.02012.10
4.3.50.0100.01312.10
4.3.40.0030.02312.10
4.3.30.0030.01312.10
4.3.20.0070.01012.10
4.3.10.0000.01712.10
4.3.00.0030.01312.10

preferences:
142.93 ms | 1394 KiB | 7 Q