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#EDITOR

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.0100.00316.86
8.3.50.0070.01022.81
8.3.40.0100.00718.66
8.3.30.0060.00919.22
8.3.20.0040.00420.39
8.3.10.0080.00023.57
8.3.00.0000.00819.38
8.2.180.0090.01216.75
8.2.170.0080.00822.96
8.2.160.0110.01120.28
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00020.97
8.2.110.0040.00420.47
8.2.100.0000.01118.22
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0050.00317.75
8.2.60.0000.00818.03
8.2.50.0030.00618.07
8.2.40.0030.00618.22
8.2.30.0000.00718.18
8.2.20.0020.00517.80
8.2.10.0040.00418.00
8.2.00.0000.00717.68
8.1.280.0150.00425.92
8.1.270.0090.00023.99
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00722.10
8.1.230.0080.00419.14
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0060.00317.00
8.1.180.0060.00318.10
8.1.170.0050.00318.64
8.1.160.0070.00021.89
8.1.150.0000.00718.88
8.1.140.0070.00017.50
8.1.130.0030.00317.74
8.1.120.0040.00417.42
8.1.110.0040.00417.46
8.1.100.0090.00017.33
8.1.90.0070.00017.34
8.1.80.0000.00717.40
8.1.70.0040.00417.30
8.1.60.0060.00617.54
8.1.50.0050.00317.55
8.1.40.0040.00417.56
8.1.30.0030.00517.51
8.1.20.0040.00417.58
8.1.10.0030.00617.52
8.1.00.0070.00017.53
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0070.00018.42
8.0.270.0070.00017.16
8.0.260.0030.00317.27
8.0.250.0060.00016.91
8.0.240.0040.00416.95
8.0.230.0030.00316.87
8.0.220.0000.00716.98
8.0.210.0000.00716.99
8.0.200.0040.00417.06
8.0.190.0050.00317.07
8.0.180.0020.00517.02
8.0.170.0070.00016.95
8.0.160.0030.00516.95
8.0.150.0000.00716.92
8.0.140.0000.00816.73
8.0.130.0050.00013.38
8.0.120.0000.00816.84
8.0.110.0040.00416.81
8.0.100.0040.00416.86
8.0.90.0000.00916.91
8.0.80.0120.00616.91
8.0.70.0040.00416.86
8.0.60.0040.00416.78
8.0.50.0040.00416.86
8.0.30.0120.00817.18
8.0.20.0120.00717.45
8.0.10.0000.00716.97
8.0.00.0050.01216.74
7.4.330.0000.00615.14
7.4.320.0030.00316.50
7.4.300.0060.00016.57
7.4.290.0030.00316.60
7.4.280.0030.00516.43
7.4.270.0030.00316.51
7.4.260.0050.00516.38
7.4.250.0070.00016.51
7.4.240.0000.00816.50
7.4.230.0070.00016.68
7.4.220.0070.01116.66
7.4.210.0030.01216.51
7.4.200.0040.00416.37
7.4.160.0100.00616.55
7.4.150.0120.01217.40
7.4.140.0060.01217.86
7.4.130.0110.00516.73
7.4.120.0060.01116.66
7.4.110.0040.01516.47
7.4.100.0110.00716.60
7.4.90.0100.00716.40
7.4.80.0150.00919.39
7.4.70.0140.00716.64
7.4.60.0060.01016.54
7.4.50.0030.00316.54
7.4.40.0140.00516.58
7.4.30.0000.01516.63
7.4.00.0040.01214.91
7.3.330.0000.00613.17
7.3.320.0030.00313.24
7.3.310.0030.00316.29
7.3.300.0000.00616.32
7.3.290.0110.00516.36
7.3.280.0060.01016.37
7.3.270.0100.00717.40
7.3.260.0120.01216.48
7.3.250.0130.00516.48
7.3.240.0130.00316.42
7.3.230.0060.01216.65
7.3.210.0150.00316.57
7.3.200.0100.00719.39
7.3.190.0070.01316.52
7.3.180.0070.01016.49
7.3.170.0060.00916.59
7.3.160.0000.01616.43
7.3.00.0100.00316.31
7.2.330.0040.01416.30
7.2.320.0090.00916.61
7.2.310.0060.01016.22
7.2.300.0060.01216.45
7.2.290.0150.00316.71
7.2.130.0030.00716.53
7.2.120.0030.00616.79
7.2.110.0040.00716.77
7.2.100.0060.00617.01
7.2.90.0040.00816.99
7.2.80.0030.00916.92
7.2.70.0090.00016.90
7.2.60.0090.00516.90
7.2.50.0030.00716.78
7.2.40.0070.00716.81
7.2.30.0080.00416.73
7.2.20.0080.00316.83
7.2.10.0100.00316.93
7.2.00.0040.00817.97
7.1.250.0070.01015.54
7.1.240.0030.00915.72
7.1.230.0040.01115.70
7.1.220.0040.00815.71
7.1.210.0060.00615.75
7.1.200.0020.00715.85
7.1.190.0080.00615.69
7.1.180.0080.00515.44
7.1.170.0040.00715.73
7.1.160.0070.00715.86
7.1.150.0040.01215.72
7.1.140.0030.00515.80
7.1.130.0060.00615.40
7.1.120.0100.00615.74
7.1.110.0030.00915.81
7.1.100.0120.00516.78
7.1.90.0030.00715.70
7.1.80.0050.00215.69
7.1.70.0050.00516.48
7.1.60.0070.01217.75
7.1.50.0030.01116.41
7.1.40.0000.01115.80
7.1.30.0040.00415.90
7.1.20.0030.00615.63
7.1.10.0030.00515.94
7.1.00.0070.04019.12
7.0.330.0090.00615.33
7.0.320.0060.00315.54
7.0.310.0030.00715.18
7.0.300.0070.00315.18
7.0.290.0000.00915.05
7.0.280.0030.00615.31
7.0.270.0100.00015.27
7.0.260.0000.01315.30
7.0.250.0060.00315.10
7.0.240.0080.00815.46
7.0.230.0070.00715.27
7.0.220.0000.00915.33
7.0.210.0080.00014.96
7.0.200.0070.00316.23
7.0.190.0000.01315.24
7.0.180.0040.00815.54
7.0.170.0060.00315.10
7.0.160.0030.00615.35
7.0.150.0000.00815.38
7.0.140.0060.03818.64
7.0.130.0000.01515.37
7.0.120.0030.01015.48
7.0.110.0060.00615.32
7.0.100.0000.00815.27
7.0.90.0000.01215.29
7.0.80.0040.01215.16
7.0.70.0000.01115.30
7.0.60.0100.04417.59
7.0.50.0040.02516.66
7.0.40.0050.04116.83
7.0.30.0150.04416.69
7.0.20.0080.02516.81
7.0.10.0070.04716.82
7.0.00.0050.02516.69
5.6.380.0040.00714.18
5.6.370.0040.00714.61
5.6.360.0080.00014.01
5.6.350.0080.00414.09
5.6.340.0030.01314.60
5.6.330.0030.00914.24
5.6.320.0040.00414.66
5.6.310.0040.00814.38
5.6.300.0000.00714.04
5.6.290.0060.00614.47
5.6.280.0030.03917.61
5.6.270.0000.01114.39
5.6.260.0040.00414.08
5.6.250.0040.00414.32
5.6.240.0000.01214.39
5.6.230.0110.00014.35
5.6.220.0030.00914.15
5.6.210.0070.03517.35
5.6.200.0030.04116.30
5.6.190.0080.02317.19
5.6.180.0190.04017.61
5.6.170.0200.03817.37
5.6.160.0050.02317.45
5.6.150.0030.03616.07
5.6.140.0050.03016.16
5.6.130.0080.03716.28
5.6.120.0060.04517.68
5.6.110.0050.04517.68
5.6.100.0060.03617.53
5.6.90.0020.02817.63
5.6.80.0030.02417.21
5.6.70.0030.01014.07
5.6.60.0110.00513.93
5.6.50.0070.00314.07
5.6.40.0030.01014.28
5.6.30.0060.00614.26
5.6.20.0030.01014.36
5.6.10.0070.00713.93
5.6.00.0080.00614.18
5.5.380.0000.00811.38
5.5.370.0000.01211.29
5.5.360.0040.00411.18
5.5.350.0130.02515.77
5.5.340.0060.04014.57
5.5.330.0050.02915.80
5.5.320.0020.02515.76
5.5.310.0230.04015.78
5.5.300.0000.03314.53
5.5.290.0050.04014.56
5.5.280.0020.04015.97
5.5.270.0070.04715.95
5.5.260.0040.03715.98
5.5.250.0070.03515.94
5.5.240.0030.03515.66
5.5.230.0070.00011.18
5.5.220.0060.00311.18
5.5.210.0050.00211.18
5.5.200.0030.00911.18
5.5.190.0000.00611.18
5.5.180.0090.00311.18
5.5.170.0060.00611.18
5.5.160.0040.00411.18
5.5.150.0040.00711.18
5.5.140.0060.00611.18
5.5.130.0030.00911.20
5.5.120.0070.00711.18
5.5.110.0030.00711.28
5.5.100.0060.00311.23
5.5.90.0040.00811.18
5.5.80.0080.00411.18
5.5.70.0000.00911.18
5.5.60.0000.00911.18
5.5.50.0030.00711.22
5.5.40.0050.00311.34
5.5.30.0090.00311.18
5.5.20.0030.00611.18
5.5.10.0060.00611.18
5.5.00.0030.00311.18
5.4.450.0380.02215.38
5.4.440.0370.03215.39
5.4.430.0130.03015.38
5.4.420.0030.03215.40
5.4.410.0430.03215.32
5.4.400.0100.02315.15
5.4.390.0370.02715.15
5.4.380.0240.02814.93
5.4.370.0180.03014.95
5.4.360.0200.02914.91
5.4.350.0200.02914.86
5.4.340.0270.03314.91
5.4.330.0000.01111.18
5.4.320.0050.02111.81
5.4.310.0030.02311.85
5.4.300.0050.02511.82
5.4.290.0040.02411.81
5.4.280.0050.01911.76
5.4.270.0040.02211.76
5.4.260.0070.02011.76
5.4.250.0050.02011.76
5.4.240.0060.01911.76
5.4.230.0030.02411.76
5.4.220.0050.02111.76
5.4.210.0020.02511.76
5.4.200.0040.02311.76
5.4.190.0040.02211.75
5.4.180.0070.02111.76
5.4.170.0080.01811.76
5.4.160.0040.02211.76
5.4.150.0070.02011.76
5.4.140.0040.02411.60
5.4.130.0060.02311.59
5.4.120.0070.01611.57
5.4.110.0060.01911.57
5.4.100.0050.01811.57
5.4.90.0060.02111.57
5.4.80.0050.02211.57
5.4.70.0090.01711.57
5.4.60.0030.02211.57
5.4.50.0020.02311.57
5.4.40.0040.02111.56
5.4.30.0050.02011.56
5.4.20.0050.02111.56
5.4.10.0020.02311.56
5.4.00.0040.02211.31
5.3.290.0050.02311.99
5.3.280.0020.02211.94
5.3.270.0040.02111.95
5.3.260.0070.02111.95
5.3.250.0080.02011.95
5.3.240.0060.02011.95
5.3.230.0050.02311.94
5.3.220.0020.02411.93
5.3.210.0040.02111.93
5.3.200.0020.02311.93
5.3.190.0080.01911.93
5.3.180.0040.02111.93
5.3.170.0040.02211.92
5.3.160.0060.01911.93
5.3.150.0060.02111.93
5.3.140.0040.02311.92
5.3.130.0040.02511.92
5.3.120.0030.02211.92
5.3.110.0020.02511.91
5.3.100.0030.02111.65
5.3.90.0050.02111.63
5.3.80.0040.02011.63
5.3.70.0060.01811.63
5.3.60.0050.02111.62
5.3.50.0030.02211.59
5.3.40.0020.02211.59
5.3.30.0060.01811.56
5.3.20.0020.02211.45
5.3.10.0040.02111.43
5.3.00.0020.02111.43
5.2.170.0020.01810.18
5.2.160.0060.01710.18
5.2.150.0040.01810.18
5.2.140.0030.01910.18
5.2.130.0060.01510.16
5.2.120.0070.01410.16
5.2.110.0060.01410.16
5.2.100.0010.02010.15
5.2.90.0030.01810.15
5.2.80.0040.01510.15
5.2.70.0020.02010.15
5.2.60.0070.01510.13
5.2.50.0050.01710.12
5.2.40.0010.02110.10
5.2.30.0030.01710.09
5.2.20.0050.01410.09
5.2.10.0030.01710.04
5.2.00.0040.0169.97
5.1.60.0000.0169.62
5.1.50.0030.0159.62
5.1.40.0070.0119.61
5.1.30.0070.0149.78
5.1.20.0040.0149.79
5.1.10.0040.0149.66
5.1.00.0030.0149.66
5.0.50.0030.0138.90
5.0.40.0020.0158.82
5.0.30.0030.0228.73
5.0.20.0020.0138.71
5.0.10.0030.0128.71
5.0.00.0030.0178.70
4.4.90.0020.0127.98
4.4.80.0040.0087.97
4.4.70.0050.0067.96
4.4.60.0030.0087.97
4.4.50.0010.0107.97
4.4.40.0030.0147.94
4.4.30.0040.0097.97
4.4.20.0010.0108.01
4.4.10.0030.0078.01
4.4.00.0030.0147.97
4.3.110.0050.0067.92
4.3.100.0010.0107.92
4.3.90.0020.0097.90
4.3.80.0010.0157.88
4.3.70.0000.0107.90
4.3.60.0040.0087.90
4.3.50.0030.0087.90
4.3.40.0030.0147.86
4.3.30.0040.0127.23
4.3.20.0040.0107.22
4.3.10.0040.0127.20
4.3.00.0080.0129.37

preferences:
39.25 ms | 401 KiB | 5 Q