3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip_address = $_SERVER['HTTP_CLIENT_IP']; } //whether ip is from proxy elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR']; } //whether ip is from remote address else { $ip_address = $_SERVER['REMOTE_ADDR']; } echo $ip_address; - See more at: http://www.w3resource.com/php-exercises/php-basic-exercises.php#sthash.BzJmdp5O.dpuf

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.290.4300.03019.30
5.4.280.3700.04019.04
5.4.270.3370.03719.23
5.4.260.3500.03719.20
5.4.250.3170.03718.83
5.4.240.3100.04318.86
5.4.230.3230.03019.22
5.4.220.3130.04018.86
5.4.210.3170.05019.15
5.4.200.3200.03319.20
5.4.190.3100.04019.23
5.4.180.3170.03719.30
5.4.170.3130.04319.22
5.4.160.3030.03319.11
5.4.150.3070.03719.17
5.4.140.3100.03716.34
5.4.130.3130.03316.40
5.4.120.3170.03316.48
5.4.110.3170.04016.45
5.4.100.3100.04316.56
5.4.90.3230.03716.52
5.4.80.3130.03316.45
5.4.70.3530.02716.35
5.4.60.3070.04016.55
5.4.50.2970.04716.53
5.4.40.3200.03716.48
5.4.30.3100.03316.41
5.4.20.3070.03716.16
5.4.10.3100.04316.41
5.4.00.2730.03715.93
5.3.280.3070.03714.55
5.3.270.2830.03714.45
5.3.260.3030.04314.49
5.3.250.2930.03714.44
5.3.240.3130.03714.62
5.3.230.3030.03014.53
5.3.220.3100.03314.42
5.3.210.2970.03314.55
5.3.200.3100.04014.42
5.3.190.3100.04314.37
5.3.180.3100.04014.50
5.3.170.3170.03714.40
5.3.160.3170.04314.47
5.3.150.3170.04314.51
5.3.140.3170.04314.39
5.3.130.2800.04314.40
5.3.120.2400.03714.64
5.3.110.3430.04714.54
5.3.100.3130.03713.88
5.3.90.3100.03713.89
5.3.80.3030.03313.80
5.3.70.2770.03714.07
5.3.60.3070.03313.96
5.3.50.2700.04013.74
5.3.40.2570.03713.89
5.3.30.2900.03013.85
5.3.20.3070.03013.53
5.3.10.3070.03313.54
5.3.00.2570.03313.48
5.2.170.2430.03012.48
5.2.160.2570.03312.48
5.2.150.2570.02012.48
5.2.140.1830.03012.48
5.2.130.2600.02012.48
5.2.120.2430.03012.48
5.2.110.2600.03012.48
5.2.100.2730.03012.48
5.2.90.2600.03312.48
5.2.80.2630.03312.48
5.2.70.2730.03312.48
5.2.60.2870.03312.48
5.2.50.2770.02312.48
5.2.40.2300.02712.48
5.2.30.2170.03012.48
5.2.20.2770.03012.48
5.2.10.2770.02712.48
5.2.00.2400.02312.48
5.1.60.2330.02312.48
5.1.50.2600.02312.48
5.1.40.1870.02712.48
5.1.30.2230.02712.48
5.1.20.2300.02312.48
5.1.10.2330.02712.48
5.1.00.2030.02712.48
5.0.50.1030.01712.48
5.0.40.1070.02012.48
5.0.30.1300.03712.48
5.0.20.1270.02712.48
5.0.10.1270.02312.48
5.0.00.1370.03312.48
4.4.90.1200.01712.48
4.4.80.1200.02012.48
4.4.70.1130.01312.48
4.4.60.1330.02012.48
4.4.50.1470.01712.48
4.4.40.1370.02312.48
4.4.30.1030.01312.48
4.4.20.1200.01312.48
4.4.10.1300.01312.48
4.4.00.1100.02312.48
4.3.110.1030.01312.48
4.3.100.1270.02012.48
4.3.90.1230.01712.48
4.3.80.1130.02712.48
4.3.70.1430.01712.48
4.3.60.1500.02012.48
4.3.50.1230.01312.48
4.3.40.1530.02312.48
4.3.30.0830.02012.48
4.3.20.0830.01712.48
4.3.10.0770.01312.48
4.3.00.0630.01312.48

preferences:
161.61 ms | 1398 KiB | 7 Q