3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet { $ipaddress = $_SERVER['HTTP_CLIENT_IP']."\r\n"; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check if ip is pass from proxy { $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']."\r\n"; } else { $ipaddress = $_SERVER['REMOTE_ADDR']."\r\n"; } $file = 'filename.txt'; //this is the file to which the IP address will be written; name it your way. $fp = fopen($file, 'a'); fwrite($fp, $ipaddress); fclose($fp); ?>

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.0090.01218.43
8.3.50.0090.00521.93
8.3.40.0120.00318.80
8.3.30.0140.00019.27
8.3.20.0000.00820.30
8.3.10.0030.00721.97
8.3.00.0090.00022.52
8.2.180.0110.00716.63
8.2.170.0100.00322.96
8.2.160.0050.00819.41
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0050.00226.16
8.2.120.0080.00017.63
8.2.110.0060.00322.08
8.2.100.0120.00019.50
8.2.90.0050.00219.26
8.2.80.0000.00818.03
8.2.70.0000.00817.75
8.2.60.0060.00317.93
8.2.50.0000.00818.07
8.2.40.0080.00018.09
8.2.30.0100.00018.05
8.2.20.0050.00317.72
8.2.10.0050.00319.59
8.2.00.0030.00517.82
8.1.280.0130.00625.92
8.1.270.0000.00722.14
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.96
8.1.230.0030.00919.02
8.1.220.0080.00017.79
8.1.210.0040.00418.77
8.1.200.0060.00317.24
8.1.190.0050.00317.53
8.1.180.0000.00818.10
8.1.170.0000.00918.66
8.1.160.0000.00722.03
8.1.150.0050.00218.61
8.1.140.0000.00917.46
8.1.130.0000.00717.84
8.1.120.0040.00417.49
8.1.110.0040.00417.46
8.1.100.0070.00017.33
8.1.90.0020.00517.27
8.1.80.0070.00017.48
8.1.70.0030.00317.47
8.1.60.0080.00017.61
8.1.50.0070.00017.51
8.1.40.0000.00917.40
8.1.30.0050.00317.66
8.1.20.0000.00817.49
8.1.10.0040.00417.50
8.1.00.0020.00517.48
8.0.300.0040.00418.77
8.0.290.0000.00717.17
8.0.280.0050.00318.44
8.0.270.0000.00717.25
8.0.260.0000.00817.03
8.0.250.0070.00017.04
8.0.240.0030.00317.13
8.0.230.0000.00917.13
8.0.220.0070.00017.11
8.0.210.0030.00516.91
8.0.200.0060.00017.08
8.0.190.0040.00417.11
8.0.180.0000.00717.09
8.0.170.0040.00417.02
8.0.160.0000.00816.91
8.0.150.0000.00716.95
8.0.140.0040.00417.03
8.0.130.0000.00613.46
8.0.120.0080.00017.04
8.0.110.0000.00717.00
8.0.100.0080.00016.86
8.0.90.0000.00716.93
8.0.80.0060.00917.00
8.0.70.0070.00017.07
8.0.60.0040.00416.98
8.0.50.0030.00516.84
8.0.30.0080.01317.20
8.0.20.0110.01017.40
8.0.10.0040.00416.99
8.0.00.0130.01116.71
7.4.330.0000.00615.00
7.4.320.0030.00316.53
7.4.300.0070.00016.66
7.4.290.0000.00616.62
7.4.280.0040.00416.64
7.4.270.0060.00316.53
7.4.260.0000.00816.53
7.4.250.0040.00416.54
7.4.240.0040.00416.59
7.4.230.0040.00416.49
7.4.220.0060.01216.51
7.4.210.0010.01316.60
7.4.200.0070.00016.62
7.4.190.0070.00016.68
7.4.160.0190.00316.57
7.4.150.0140.00417.40
7.4.140.0140.00717.86
7.4.130.0130.00616.60
7.4.120.0110.00816.51
7.4.110.0140.00416.65
7.4.100.0000.01716.65
7.4.90.0090.01416.61
7.4.80.0100.00719.39
7.4.70.0130.00316.52
7.4.60.0110.00616.52
7.4.50.0030.00316.60
7.4.40.0070.00722.77
7.4.30.0160.00616.53
7.4.00.0030.01315.18
7.3.330.0050.00013.34
7.3.320.0050.00013.44
7.3.310.0030.00316.32
7.3.300.0070.00016.34
7.3.290.0070.01016.55
7.3.280.0100.00816.47
7.3.270.0120.00617.40
7.3.260.0120.00616.47
7.3.250.0100.00916.60
7.3.240.0090.00916.37
7.3.230.0090.00916.59
7.3.210.0170.00016.36
7.3.200.0070.01419.39
7.3.190.0090.01216.38
7.3.180.0090.00816.44
7.3.170.0060.01016.62
7.3.160.0120.00816.43
7.3.120.0040.01214.90
7.2.330.0420.00516.49
7.2.320.0060.01716.46
7.2.310.0060.01216.71
7.2.300.0030.01316.81
7.2.290.0100.00716.81
7.2.60.0070.00716.79
7.2.00.0000.01319.43
7.1.200.0120.00315.57
7.1.100.0070.00418.14
7.1.70.0000.00917.11
7.1.60.0030.01019.82
7.1.50.0040.00816.93
7.1.00.0030.07722.31
7.0.200.0090.00316.75
7.0.140.0030.07322.06
7.0.60.0070.04320.00
7.0.50.0030.04317.81
7.0.40.0030.04720.10
7.0.30.0230.05720.31
7.0.20.0200.04720.09
7.0.10.0070.05720.20
7.0.00.0070.07720.09
5.6.280.0100.06721.02
5.6.210.0070.07020.62
5.6.200.0070.06718.22
5.6.190.0130.07720.48
5.6.180.3200.04720.64
5.6.170.0330.08320.61
5.6.160.0130.06320.37
5.6.150.0070.03718.21
5.6.140.0130.07718.17
5.6.130.0100.05018.16
5.6.120.0070.07020.90
5.6.110.0100.09020.85
5.6.100.0070.07721.01
5.6.90.0100.06720.97
5.6.80.0130.06720.50
5.5.350.0130.04720.43
5.5.340.0030.08317.95
5.5.330.0070.09020.23
5.5.320.0430.07020.31
5.5.310.0330.04320.34
5.5.300.0070.08317.91
5.5.290.0070.03717.89
5.5.280.0170.07020.87
5.5.270.0070.07320.82
5.5.260.0130.07720.86
5.5.250.0100.03320.54
5.5.240.0130.07320.12
5.4.450.0470.02719.43
5.4.440.0630.07719.47
5.4.430.0830.05319.51
5.4.420.0070.05719.68
5.4.410.0070.05718.91
5.4.400.0500.04718.72
5.4.390.0230.05318.62
5.4.380.0000.06318.72
5.4.370.0070.03718.74
5.4.360.0100.03718.77
5.4.350.0010.03911.98
5.4.340.0070.03711.97
5.4.320.0080.03712.46
5.4.310.0020.04112.46
5.4.300.0060.04312.46
5.4.290.0080.03712.45
5.4.280.0070.03812.35
5.4.270.0130.06719.01
5.4.260.0100.06718.99
5.4.250.0070.06318.97
5.4.240.0130.06018.91
5.4.230.0030.06719.06
5.4.220.0070.07018.86
5.4.210.0130.05019.00
5.4.200.0100.05318.99
5.4.190.0100.06019.02
5.4.180.0100.06318.96
5.4.170.0070.06318.78
5.4.160.0200.05718.93
5.4.150.0070.06719.06
5.4.140.0130.06016.45
5.4.130.0100.05716.48
5.4.120.0000.08016.39
5.4.110.0230.04716.63
5.4.100.0070.05716.61
5.4.90.0070.05716.55
5.4.80.0070.07316.42
5.4.70.0170.05016.39
5.4.60.0100.06316.28
5.4.50.0200.03716.32
5.4.40.0200.05716.55
5.4.30.0100.06716.53
5.4.20.0030.07716.32
5.4.10.0030.06716.24
5.4.00.0100.04715.88
5.3.290.0040.04112.80
5.3.280.0070.05714.75
5.3.270.0200.06314.71
5.3.260.0100.07314.66
5.3.250.0030.05714.78
5.3.240.0170.07014.54
5.3.230.0070.06314.68
5.3.220.0170.06314.38
5.3.210.0070.05314.55
5.3.200.0000.06314.56
5.3.190.0030.05714.55
5.3.180.0070.07314.70
5.3.170.0100.05314.62
5.3.160.0100.07014.38
5.3.150.0100.05314.54
5.3.140.0030.05714.54
5.3.130.0100.05014.74
5.3.120.0130.06014.61
5.3.110.0100.07714.53
5.3.100.0100.06014.02
5.3.90.0100.05714.17
5.3.80.0100.05314.10
5.3.70.0170.04714.00
5.3.60.0100.06714.08
5.3.50.0100.05314.11
5.3.40.0070.05313.93
5.3.30.0130.06713.98
5.3.20.0100.05313.84
5.3.10.0130.06013.80
5.3.00.0100.05013.70
5.2.170.0100.05311.38
5.2.160.0170.03311.30
5.2.150.0130.05311.34
5.2.140.0130.04011.27
5.2.130.0030.05711.34
5.2.120.0100.03711.33
5.2.110.0030.04710.95
5.2.100.0030.04311.23
5.2.90.0130.04011.25
5.2.80.0030.05711.24
5.2.70.0070.04711.28
5.2.60.0130.03311.29
5.2.50.0070.05311.25
5.2.40.0070.04711.19
5.2.30.0000.06311.08
5.2.20.0030.04711.11
5.2.10.0000.04310.95
5.2.00.0100.04310.95
5.1.60.0000.05010.95
5.1.50.0000.05010.95
5.1.40.0070.03310.95
5.1.30.0030.03710.95
5.1.20.0070.04010.95
5.1.10.0200.03010.95
5.1.00.0070.03710.95
5.0.50.0000.03010.95
5.0.40.0030.03010.95
5.0.30.0030.05310.95
5.0.20.0100.02710.95
5.0.10.0030.02710.95
5.0.00.0030.04310.95
4.4.90.0000.02310.95
4.4.80.0000.02310.95
4.4.70.0070.02010.95
4.4.60.0100.02010.95
4.4.50.0030.02710.95
4.4.40.0030.04310.95
4.4.30.0030.02710.95
4.4.20.0030.03010.95
4.4.10.0100.01710.95
4.4.00.0000.03710.95
4.3.110.0000.03010.95
4.3.100.0030.02310.95
4.3.90.0030.02310.95
4.3.80.0100.03010.95
4.3.70.0030.03010.95
4.3.60.0000.02310.95
4.3.50.0070.02310.95
4.3.40.0000.04710.95
4.3.30.0000.03010.95
4.3.20.0000.03010.95
4.3.10.0100.02310.95
4.3.00.0070.01315.58

preferences:
57.63 ms | 401 KiB | 5 Q