3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$homepage = FILE_GET_CONTENTS('WWW.ROGERS.COM'); $homepage = true; if(!$homepage){ die("FILE_GET_CONTENTS_ERROR"); } $rogers = "tttttttt<a href=\"/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr\">francais</a>tttttttttt"; echo($rogers); echo("\n"); $pos = strpos($rogers, "francais"); if($pos === FALSE){ die("STRPOS_ERROR"); } $rogers = substr($rogers, 0, $pos); if(!$rogers){ die("SUBSTR_ERROR"); } echo($rogers); echo("\n"); $revrogers = strrev($rogers); echo($rogers); echo("\n"); echo($revrogers); $pos = strpos($revrogers, "a<"); if($pos === FALSE){ die("STRPOS_ERROR"); } $rogers = substr($rogers, 0, $pos); if(!$rogers){ die("SUBSTR_ERROR"); }

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.40.0100.00718.42
8.3.30.0070.00719.04
8.3.20.0080.00020.28
8.3.10.0040.00421.90
8.3.00.0040.00419.26
8.2.170.0110.00422.96
8.2.160.0130.00020.35
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0130.00626.16
8.2.120.0000.00819.23
8.2.110.0130.00319.27
8.2.100.0120.00017.63
8.2.90.0000.00819.23
8.2.80.0000.00817.97
8.2.70.0050.00317.38
8.2.60.0080.00017.68
8.2.50.0000.00918.07
8.2.40.0060.00318.21
8.2.30.0040.00418.11
8.2.20.0040.00417.67
8.2.10.0030.00518.12
8.2.00.0000.00717.68
8.1.270.0090.00020.57
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0030.00723.92
8.1.230.0000.01217.42
8.1.220.0000.00917.76
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0080.00017.13
8.1.180.0080.00018.10
8.1.170.0040.00420.29
8.1.160.0040.00422.00
8.1.150.0000.00718.76
8.1.140.0040.00417.37
8.1.130.0030.00317.82
8.1.120.0000.00717.36
8.1.110.0040.00417.39
8.1.100.0000.00717.36
8.1.90.0040.00417.47
8.1.80.0030.00617.48
8.1.70.0040.00417.45
8.1.60.0040.00417.59
8.1.50.0040.00417.58
8.1.40.0040.00417.54
8.1.30.0040.00417.54
8.1.20.0080.00017.67
8.1.10.0040.00417.41
8.1.00.0080.00017.42
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.36
8.0.270.0030.00316.82
8.0.260.0000.00617.22
8.0.250.0030.00316.98
8.0.240.0040.00416.95
8.0.230.0000.00617.00
8.0.220.0040.00416.88
8.0.210.0030.00316.84
8.0.200.0030.00316.84
8.0.190.0030.00316.84
8.0.180.0030.00516.92
8.0.170.0020.00516.82
8.0.160.0030.00416.89
8.0.150.0000.00816.78
8.0.140.0040.00416.84
8.0.130.0030.00313.32
8.0.120.0040.00416.75
8.0.110.0000.00716.91
8.0.100.0050.00216.85
8.0.90.0050.00316.78
8.0.80.0070.01016.86
8.0.70.0000.00816.72
8.0.60.0000.00716.94
8.0.50.0030.00616.76
8.0.30.0140.00817.20
8.0.20.0090.00917.40
8.0.10.0050.00217.04
8.0.00.0050.01216.80
7.4.330.0000.00515.03
7.4.320.0080.00016.50
7.4.300.0030.00316.50
7.4.290.0070.00016.59
7.4.280.0050.00516.50
7.4.270.0040.00416.55
7.4.260.0070.00016.60
7.4.250.0040.00416.45
7.4.240.0000.00816.52
7.4.230.0000.00716.65
7.4.220.0030.00316.44
7.4.210.0040.01116.43
7.4.200.0020.00516.70
7.4.160.0080.00816.34
7.4.150.0140.00517.40
7.4.140.0050.01217.86
7.4.130.0060.01116.48
7.4.120.0110.00616.45
7.4.110.0080.00816.32
7.4.100.0140.00916.53
7.4.90.0080.00816.44
7.4.80.0110.01019.39
7.4.70.0110.01116.41
7.4.60.0040.01216.52
7.4.50.0040.00416.16
7.4.40.0070.01116.54
7.4.30.0090.00916.47
7.4.00.0090.00614.61
7.3.330.0000.00513.05
7.3.320.0090.00613.06
7.3.310.0040.00416.30
7.3.300.0000.00716.11
7.3.290.0060.00916.28
7.3.280.0090.00816.24
7.3.270.0040.01917.40
7.3.260.0050.01116.36
7.3.250.0070.01716.22
7.3.240.0100.00716.48
7.3.230.0120.01216.42
7.3.210.0130.00316.28
7.3.200.0070.01019.39
7.3.190.0100.00716.34
7.3.180.0110.00416.36
7.3.170.0110.00716.29
7.3.160.0100.00716.39
7.3.10.0030.01016.61
7.3.00.0000.01316.55
7.2.330.0130.00316.46
7.2.320.0110.01116.71
7.2.310.0120.00916.64
7.2.300.0070.01016.45
7.2.290.0110.01116.59
7.2.130.0000.01116.75
7.2.120.0040.00416.31
7.2.110.0100.00316.69
7.2.100.0070.00716.48
7.2.90.0040.00716.64
7.2.80.0080.00416.89
7.2.70.0000.01016.81
7.2.60.0040.00716.54
7.2.50.0110.00316.74
7.2.40.0080.00416.74
7.2.30.0000.01316.82
7.2.20.0090.00616.68
7.2.10.0060.00616.82
7.2.00.0060.00718.13
7.1.250.0030.00715.70
7.1.100.0080.00317.88
7.1.70.0030.00617.19
7.1.60.0110.01419.50
7.1.50.0030.01916.83
7.1.00.0030.07022.31
7.0.200.0040.01115.05
7.0.140.0030.07722.02
7.0.60.0030.05019.97
7.0.50.0100.04017.82
7.0.40.0030.04320.12
7.0.30.0200.05720.18
7.0.20.0170.04320.33
7.0.10.0200.07020.05
7.0.00.0070.08720.11
5.6.280.0070.07020.91
5.6.210.0100.03320.48
5.6.200.0100.08018.19
5.6.190.0070.06320.61
5.6.180.0100.07320.45
5.6.170.0200.04720.51
5.6.160.0100.08020.49
5.6.150.0100.06018.17
5.6.140.0030.04018.18
5.6.130.0100.04318.11
5.6.120.0030.05021.04
5.6.110.0030.08720.98
5.6.100.0330.05321.11
5.6.90.0000.04320.99
5.6.80.0130.07320.50
5.5.350.3200.03320.41
5.5.340.0170.06718.02
5.5.330.0030.08720.36
5.5.320.0270.04020.34
5.5.310.0270.07720.34
5.5.300.0070.07017.87
5.5.290.0030.05717.89
5.5.280.0070.04020.77
5.5.270.0030.04320.97
5.5.260.0070.07320.82
5.5.250.0130.08720.77
5.5.240.0330.06020.26
5.4.450.0230.06719.58
5.4.440.0730.05319.47
5.4.430.0870.05019.43
5.4.420.0730.05319.48
5.4.410.0470.06319.00
5.4.400.0130.05718.77
5.4.390.0230.05018.51
5.4.380.0200.05018.70
5.4.370.0230.05718.72
5.4.360.0170.05718.53
5.4.350.0300.07718.50
5.4.340.0100.06018.83
5.4.320.0170.05318.66
5.4.310.0300.04018.50
5.4.300.0200.05018.73
5.4.290.0230.04718.52
5.4.280.0230.04718.69
5.4.270.0100.06318.63
5.4.260.0200.05018.57
5.4.250.0270.04718.71
5.4.240.0170.05718.52
5.4.230.0230.04318.64
5.4.220.0170.05318.74
5.4.210.0300.04018.67
5.4.200.0200.04716.55
5.4.190.0200.04718.66
5.4.180.0200.05318.46
5.4.170.0170.05318.64
5.4.160.0170.05318.72
5.4.150.0170.05318.60
5.4.140.0200.05716.09
5.4.130.0170.06016.35
5.4.120.0270.04316.27
5.4.110.0200.05316.25
5.4.100.0170.05316.26
5.4.90.0270.04316.29
5.4.80.0270.04016.18
5.4.70.0230.04716.20
5.4.60.0230.05016.23
5.4.50.0170.05315.98
5.4.40.0200.05016.17
5.4.30.0100.05716.22
5.4.20.0130.06016.22
5.4.10.0200.04716.21
5.4.00.0200.05015.62
5.3.290.0330.04314.55
5.3.280.0100.06014.52
5.3.270.0200.05714.60
5.3.260.0170.06314.61
5.3.250.0230.05314.55
5.3.240.0230.05314.64
5.3.230.0270.05714.53
5.3.220.0270.04714.54
5.3.210.0200.05714.54
5.3.200.0200.05314.48
5.3.190.0230.07314.55
5.3.180.0300.06014.54
5.3.170.0270.04714.64
5.3.160.0230.04714.61
5.3.150.0270.04714.59
5.3.140.0130.06014.48
5.3.130.0230.07014.64
5.3.120.0170.05314.49
5.3.110.0170.06314.55
5.3.100.0230.04714.04
5.3.90.0170.05314.09
5.3.80.0170.05313.95
5.3.70.0130.05714.11
5.3.60.0130.06013.95
5.3.50.0200.06714.03
5.3.40.0270.06014.02
5.3.30.0270.06013.98
5.3.20.0200.06713.67
5.3.10.0130.07013.64
5.3.00.0230.04313.57
5.2.170.0130.04311.13
5.2.160.0100.04311.13
5.2.150.0230.04011.18
5.2.140.0200.03311.18
5.2.130.0070.04711.08
5.2.120.0100.04311.05
5.2.110.0100.04711.16
5.2.100.0130.05011.06
5.2.90.0200.03711.04
5.2.80.0200.03711.05
5.2.70.0100.04711.07
5.2.60.0100.04711.04
5.2.50.0200.04010.99
5.2.40.0200.03311.00
5.2.30.0100.04311.01
5.2.20.0200.03310.90
5.2.10.0100.04011.01
5.2.00.0170.03710.75
5.1.60.0070.04010.05
5.1.50.0030.0439.98
5.1.40.0130.0339.98
5.1.30.0170.03310.44
5.1.20.0130.03310.44
5.1.10.0070.04310.06
5.1.00.0200.03010.09
5.0.50.0100.0278.58
5.0.40.0100.0278.44
5.0.30.0070.0438.27
5.0.20.0070.0278.38
5.0.10.0100.0308.31
5.0.00.0070.0508.24
4.4.90.0100.0236.80
4.4.80.0030.0276.80
4.4.70.0070.0236.80
4.4.60.0170.0106.80
4.4.50.0100.0236.80
4.4.40.0130.0376.80
4.4.30.0070.0236.80
4.4.20.0000.0276.80
4.4.10.0070.0236.80
4.4.00.0070.0436.80
4.3.110.0030.0276.80
4.3.100.0070.0206.80
4.3.90.0070.0206.80
4.3.80.0070.0406.80
4.3.70.0030.0236.80
4.3.60.0070.0206.80
4.3.50.0100.0206.80
4.3.40.0030.0376.80
4.3.30.0070.0206.80
4.3.20.0030.0306.80
4.3.10.0070.0206.80
4.3.00.0070.0206.82

preferences:
44.7 ms | 400 KiB | 5 Q