3v4l.org

run code in 300+ PHP versions simultaneously
<?php //whether ip is from share internet 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.3JMBTeMz.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)
8.3.60.0110.00418.43
8.3.50.0100.01022.07
8.3.40.0140.00018.93
8.3.30.0090.00918.96
8.3.20.0080.00020.25
8.3.10.0040.00420.57
8.3.00.0040.00419.38
8.2.180.0140.00316.75
8.2.170.0110.00722.96
8.2.160.0070.00720.53
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0080.00022.25
8.2.110.0100.00019.27
8.2.100.0040.00717.97
8.2.90.0050.00320.02
8.2.80.0000.00818.16
8.2.70.0000.00817.99
8.2.60.0070.00018.04
8.2.50.0000.00918.10
8.2.40.0040.00420.45
8.2.30.0050.00319.44
8.2.20.0040.00417.89
8.2.10.0030.00518.06
8.2.00.0000.00717.73
8.1.280.0100.01025.92
8.1.270.0000.00822.05
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0000.00822.59
8.1.230.0030.00722.67
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0040.00417.23
8.1.190.0030.00617.23
8.1.180.0000.00818.10
8.1.170.0000.01418.64
8.1.160.0040.00422.11
8.1.150.0040.00418.89
8.1.140.0040.00417.45
8.1.130.0040.00417.82
8.1.120.0000.00717.45
8.1.110.0030.00517.38
8.1.100.0000.00717.35
8.1.90.0030.00317.36
8.1.80.0030.00317.35
8.1.70.0000.00717.40
8.1.60.0060.00317.50
8.1.50.0050.00317.41
8.1.40.0040.00417.39
8.1.30.0000.00817.50
8.1.20.0040.00417.70
8.1.10.0040.00417.54
8.1.00.0000.00717.42
8.0.300.0040.00420.07
8.0.290.0040.00416.63
8.0.280.0000.00718.44
8.0.270.0070.00017.18
8.0.260.0040.00417.30
8.0.250.0070.00016.98
8.0.240.0000.00616.98
8.0.230.0000.00717.03
8.0.220.0000.00816.88
8.0.210.0030.00316.96
8.0.200.0000.00716.98
8.0.190.0000.00816.97
8.0.180.0070.00016.95
8.0.170.0080.00016.94
8.0.160.0050.00316.92
8.0.150.0000.00716.98
8.0.140.0080.00016.81
8.0.130.0050.00013.33
8.0.120.0030.00716.88
8.0.110.0000.00716.85
8.0.100.0040.00416.91
8.0.90.0030.00516.75
8.0.80.0070.00816.99
8.0.70.0040.00416.84
8.0.60.0040.00416.77
8.0.50.0000.00716.91
8.0.30.0080.01417.06
8.0.20.0120.01317.40
8.0.10.0000.00717.14
8.0.00.0120.00816.69
7.4.330.0050.00015.12
7.4.320.0060.00016.51
7.4.300.0060.00016.57
7.4.290.0000.00816.38
7.4.280.0040.00416.50
7.4.270.0060.00016.48
7.4.260.0040.00416.61
7.4.250.0070.00016.61
7.4.240.0040.00416.51
7.4.230.0000.00716.30
7.4.220.0140.00316.54
7.4.210.0030.01116.67
7.4.200.0030.00316.65
7.4.160.0100.01016.50
7.4.150.0110.00717.40
7.4.140.0120.00917.86
7.4.130.0120.00716.60
7.4.120.0090.00916.54
7.4.110.0060.01016.44
7.4.100.0090.01216.49
7.4.90.0100.00716.55
7.4.80.0070.01016.54
7.4.70.0040.01116.44
7.4.60.0100.00616.40
7.4.50.0040.00416.59
7.4.40.0110.00516.49
7.4.30.0130.00316.76
7.4.10.0030.01415.15
7.4.00.0130.00414.97
7.3.330.0000.00613.15
7.3.320.0050.00013.25
7.3.310.0030.00316.44
7.3.300.0000.00716.35
7.3.290.0090.00616.39
7.3.280.0070.00816.37
7.3.270.0100.00717.40
7.3.260.0080.00816.48
7.3.250.0100.00716.55
7.3.240.0120.00616.39
7.3.230.0110.00516.59
7.3.210.0100.00716.22
7.3.200.0100.00719.39
7.3.190.0040.01416.44
7.3.180.0110.00416.40
7.3.170.0080.00816.43
7.3.160.0060.00916.52
7.3.130.0120.00615.12
7.3.120.0060.00814.97
7.3.110.0030.00715.03
7.3.100.0120.00314.82
7.3.90.0070.00714.70
7.3.80.0050.00315.05
7.3.70.0070.00714.48
7.3.60.0000.01214.89
7.3.50.0030.00714.82
7.3.40.0070.00714.92
7.3.30.0100.00614.68
7.3.20.0000.01216.78
7.3.10.0000.00816.82
7.3.00.0140.00316.85
7.2.330.0130.00916.67
7.2.320.0070.01016.33
7.2.310.0120.00616.38
7.2.300.0070.01016.76
7.2.290.0140.00316.80
7.2.260.0060.00914.73
7.2.250.0070.01014.88
7.2.240.0000.01414.94
7.2.230.0070.01115.01
7.2.220.0030.01014.92
7.2.210.0000.01215.19
7.2.200.0040.00814.76
7.2.190.0100.00314.88
7.2.180.0030.01314.82
7.2.170.0140.00414.91
7.2.160.0050.00514.99
7.2.150.0000.01517.04
7.2.140.0070.00317.02
7.2.130.0030.01016.87
7.2.120.0110.00416.65
7.2.110.0040.00816.83
7.2.100.0040.01216.91
7.2.90.0040.01116.98
7.2.80.0090.00317.03
7.2.70.0070.00716.85
7.2.60.0070.00616.87
7.2.50.0060.00816.67
7.2.40.0090.00617.00
7.2.30.0040.00716.84
7.2.20.0060.00616.91
7.2.10.0040.01217.06
7.2.00.0070.01117.87
7.1.330.0000.00916.02
7.1.320.0090.00615.65
7.1.310.0070.00715.84
7.1.300.0000.01315.50
7.1.290.0090.00615.74
7.1.280.0060.01015.66
7.1.270.0070.00715.62
7.1.260.0000.00915.96
7.1.250.0070.00715.97
7.1.240.0030.00715.65
7.1.230.0080.00815.59
7.1.220.0030.01015.60
7.1.210.0100.00715.58
7.1.200.0020.00915.80
7.1.190.0000.01115.88
7.1.180.0040.00815.55
7.1.170.0000.01115.41
7.1.160.0040.00815.86
7.1.150.0030.01015.47
7.1.140.0030.01015.77
7.1.130.0000.01215.95
7.1.120.0070.00715.39
7.1.110.0120.00015.45
7.1.100.0590.00516.00
7.1.90.0130.00015.42
7.1.80.0120.00015.59
7.1.70.0050.00716.42
7.1.60.0080.00817.37
7.1.50.0030.00816.17
7.1.40.0070.00715.66
7.1.30.0080.00615.70
7.1.20.0100.00015.76
7.1.10.0120.00315.63
7.1.00.0080.03919.10
7.0.330.0030.01215.26
7.0.320.0030.00915.40
7.0.310.0030.00915.48
7.0.300.0060.00615.10
7.0.290.0080.00415.54
7.0.280.0060.00615.42
7.0.270.0040.01115.38
7.0.260.0040.00815.56
7.0.250.0030.01015.38
7.0.240.0090.00615.31
7.0.230.0060.00615.61
7.0.220.0060.00615.25
7.0.210.0030.00715.39
7.0.200.0020.00915.98
7.0.190.0070.00415.36
7.0.180.0030.00515.54
7.0.170.0050.00815.31
7.0.160.0090.00015.39
7.0.150.0080.00015.38
7.0.140.0070.03718.82
7.0.130.0040.00715.23
7.0.120.0060.00615.55
7.0.110.0030.01015.56
7.0.100.0030.01015.22
7.0.90.0040.00815.35
7.0.80.0170.00015.57
7.0.70.0110.00415.14
7.0.60.0130.03218.62
7.0.50.0050.04316.61
7.0.40.0070.02616.74
7.0.30.0200.02316.79
7.0.20.0200.03716.79
7.0.10.0090.02216.89
7.0.00.0050.04916.86
5.6.400.0000.01614.32
5.6.390.0000.01014.25
5.6.380.0030.01014.48
5.6.370.0100.00014.54
5.6.360.0060.00914.71
5.6.350.0040.00814.17
5.6.340.0030.00614.68
5.6.330.0100.00314.55
5.6.320.0100.00314.14
5.6.310.0040.00414.73
5.6.300.0030.01014.15
5.6.290.0040.01114.16
5.6.280.0060.03917.79
5.6.270.0070.00714.15
5.6.260.0090.00614.38
5.6.250.0100.00314.64
5.6.240.0070.00714.63
5.6.230.0060.00614.21
5.6.220.0090.00614.22
5.6.210.0030.05117.50
5.6.200.0050.02216.16
5.6.190.0080.02017.52
5.6.180.0230.03017.52
5.6.170.0270.03517.39
5.6.160.0050.02517.39
5.6.150.0080.04216.18
5.6.140.0050.02316.32
5.6.130.0110.03116.19
5.6.120.0020.03417.69
5.6.110.0080.04317.64
5.6.100.0080.04517.71
5.6.90.0050.03217.71
5.6.80.0060.04317.33
5.6.70.0000.01314.25
5.6.60.0030.01414.26
5.6.50.0060.00613.87
5.6.40.0040.00714.32
5.6.30.0060.00614.37
5.6.20.0030.01014.18
5.6.10.0000.01014.20
5.6.00.0030.01014.36
5.5.380.0100.00614.28
5.5.370.0030.01313.77
5.5.360.0050.00514.00
5.5.350.0070.04017.30
5.5.340.0080.02216.15
5.5.330.0060.02317.55
5.5.320.0230.02217.29
5.5.310.0140.02217.19
5.5.300.0130.02616.08
5.5.290.0050.04316.10
5.5.280.0070.04117.32
5.5.270.0100.04317.45
5.5.260.0110.03917.60
5.5.250.0050.04317.42
5.5.240.0080.04517.21
5.5.230.0000.01513.98
5.5.220.0080.00614.13
5.5.210.0050.01014.22
5.5.200.0030.00714.29
5.5.190.0060.00913.74
5.5.180.0040.00814.18
5.5.170.0080.00313.99
5.5.160.0030.00914.24
5.5.150.0030.01014.34
5.5.140.0100.00014.37
5.5.130.0000.01014.04
5.5.120.0000.01514.10
5.5.110.0060.00613.91
5.5.100.0090.00314.43
5.5.90.0000.01314.32
5.5.80.0060.00614.36
5.5.70.0000.01313.96
5.5.60.0080.00013.97
5.5.50.0070.00714.22
5.5.40.0090.00314.45
5.5.30.0070.00714.03
5.5.20.0000.01613.79
5.5.10.0030.00614.32
5.5.00.0000.01114.23
5.4.450.2070.02015.20
5.4.440.1090.02415.20
5.4.430.1920.02215.18
5.4.420.1740.02015.14
5.4.410.2080.02015.11
5.4.400.1850.02414.95
5.4.390.0050.03015.00
5.4.380.1830.02215.14
5.4.370.2170.02314.95
5.4.360.2130.02415.03
5.4.350.2030.02314.93
5.4.340.1730.02214.89
5.4.330.0000.00910.64
5.4.320.0100.03314.93
5.4.310.0050.04315.21
5.4.300.0700.03015.01
5.4.290.0930.02015.06
5.4.280.1090.02415.03
5.4.270.0370.02514.92
5.4.260.1720.02015.06
5.4.250.1920.02314.98
5.4.240.1730.02314.86
5.4.230.1970.02215.12
5.4.220.1910.02114.98
5.4.210.1380.02115.02
5.4.200.1950.02014.88
5.4.190.1830.02315.18
5.4.180.1770.02314.76
5.4.170.1950.01814.92
5.4.160.2330.02115.05
5.4.150.2330.02214.94
5.4.140.2380.01813.53
5.4.130.1960.02113.63
5.4.120.1650.02213.54
5.4.110.1700.01813.73
5.4.100.1750.01713.79
5.4.90.1730.01713.78
5.4.80.2270.01713.81
5.4.70.2360.01513.72
5.4.60.2180.02113.77
5.4.50.1970.02213.59
5.4.40.1950.01813.72
5.4.30.2020.02513.56
5.4.20.1960.02313.70
5.4.10.1880.01813.63
5.4.00.2120.02313.29
5.3.290.0030.08314.56
5.3.280.3300.04014.54
5.3.270.3730.03714.54
5.3.260.4230.03014.53
5.3.250.4600.03314.56
5.3.240.4500.03314.69
5.3.230.3700.04314.56
5.3.220.3530.03714.50
5.3.210.3800.03314.57
5.3.200.4130.04014.54
5.3.190.3700.04014.48
5.3.180.3970.03714.46
5.3.170.4330.04014.52
5.3.160.4730.04014.48
5.3.150.5270.04014.48
5.3.140.3770.03014.37
5.3.130.4770.03314.36
5.3.120.4400.03714.42
5.3.110.4100.03714.48
5.3.100.4200.04013.96
5.3.90.3300.04013.92
5.3.80.3800.04013.85
5.3.70.3470.04013.97
5.3.60.3730.03013.93
5.3.50.3930.03313.88
5.3.40.3970.03713.96
5.3.30.3800.03313.84
5.3.20.3770.03313.52
5.3.10.3930.04013.62
5.3.00.3870.03013.58
5.2.170.3070.03711.07
5.2.160.3300.02711.14
5.2.150.3200.03011.13
5.2.140.3100.03011.22
5.2.130.3030.03011.03
5.2.120.3070.02711.18
5.2.110.2900.02711.00
5.2.100.3200.03311.18
5.2.90.3530.02311.00
5.2.80.3300.02711.25
5.2.70.3430.03311.07
5.2.60.3570.02310.94
5.2.50.3470.02310.96
5.2.40.2730.02710.89
5.2.30.3170.04311.05
5.2.20.3070.03010.88
5.2.10.2630.03310.86
5.2.00.2630.03010.59
5.1.60.2900.0279.97
5.1.50.2600.0279.83
5.1.40.2630.0309.88
5.1.30.2870.02310.34
5.1.20.2430.03010.43
5.1.10.2970.02710.21
5.1.00.3000.02310.04
5.0.50.1230.0208.61
5.0.40.1670.0178.46
5.0.30.1800.0338.21
5.0.20.1930.0208.23
5.0.10.1570.0208.13
5.0.00.1770.0278.21
4.4.90.1500.0176.02
4.4.80.1500.0176.02
4.4.70.1400.0176.02
4.4.60.1730.0106.02
4.4.50.1530.0176.02
4.4.40.1370.0206.02
4.4.30.1500.0176.02
4.4.20.1470.0206.04
4.4.10.1470.0206.04
4.4.00.1730.0276.04
4.3.110.1500.0176.04
4.3.100.1800.0176.04
4.3.90.1570.0206.04
4.3.80.1530.0236.04
4.3.70.1370.0176.04
4.3.60.1370.0176.04
4.3.50.1370.0136.04
4.3.40.1430.0276.04
4.3.30.0770.0206.04
4.3.20.0800.0176.04
4.3.10.0670.0176.04
4.3.00.0830.0236.04

preferences:
61.44 ms | 401 KiB | 5 Q