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.ilut7ZGS.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.00618.40
8.3.50.0110.00522.00
8.3.40.0090.00918.79
8.3.30.0100.00319.13
8.3.20.0000.00820.16
8.3.10.0100.00723.57
8.3.00.0070.00321.02
8.2.180.0110.01116.85
8.2.170.0100.00722.96
8.2.160.0070.00720.53
8.2.150.0040.00424.18
8.2.140.0100.00324.66
8.2.130.0040.00426.16
8.2.120.0030.00519.38
8.2.110.0100.00022.13
8.2.100.0120.00417.75
8.2.90.0000.00819.35
8.2.80.0060.00317.97
8.2.70.0100.00017.75
8.2.60.0110.00018.16
8.2.50.0060.00318.07
8.2.40.0000.00718.28
8.2.30.0000.00718.18
8.2.20.0000.00717.68
8.2.10.0050.00218.12
8.2.00.0080.00019.40
8.1.280.0070.01025.92
8.1.270.0080.00023.88
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0050.00523.84
8.1.230.0040.00719.15
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.09
8.1.180.0000.00818.10
8.1.170.0070.00318.53
8.1.160.0000.00722.06
8.1.150.0000.00718.55
8.1.140.0070.00017.45
8.1.130.0030.00317.78
8.1.120.0000.00817.38
8.1.110.0020.00517.44
8.1.100.0000.00717.39
8.1.90.0000.00817.36
8.1.80.0070.00017.35
8.1.70.0000.00717.30
8.1.60.0040.00417.46
8.1.50.0000.00817.55
8.1.40.0030.00617.39
8.1.30.0030.00617.54
8.1.20.0040.00417.69
8.1.10.0040.00417.57
8.1.00.0000.00817.58
8.0.300.0040.00418.77
8.0.290.0000.00916.75
8.0.280.0030.00318.35
8.0.270.0070.00017.25
8.0.260.0050.00217.16
8.0.250.0050.00217.03
8.0.240.0030.00317.00
8.0.230.0000.00816.99
8.0.220.0040.00416.84
8.0.210.0000.00717.02
8.0.200.0060.00016.97
8.0.190.0040.00416.97
8.0.180.0000.00716.96
8.0.170.0030.00516.93
8.0.160.0000.00716.82
8.0.150.0040.00416.89
8.0.140.0000.00716.90
8.0.130.0000.00613.39
8.0.120.0000.00816.92
8.0.110.0000.00816.99
8.0.100.0000.00717.07
8.0.90.0000.00716.79
8.0.80.0100.00716.95
8.0.70.0030.00616.73
8.0.60.0030.00316.96
8.0.50.0050.00316.97
8.0.30.0100.00917.26
8.0.20.0200.01117.40
8.0.10.0000.00717.15
8.0.00.0150.01816.77
7.4.330.0030.00315.02
7.4.320.0000.00716.60
7.4.300.0030.00316.63
7.4.290.0050.00516.61
7.4.280.0040.00416.62
7.4.270.0040.00416.63
7.4.260.0040.00416.58
7.4.250.0050.00216.49
7.4.240.0040.00416.50
7.4.230.0000.00716.50
7.4.220.0100.01616.57
7.4.210.0070.00716.66
7.4.200.0000.00716.34
7.4.160.0080.00816.57
7.4.150.0110.00717.40
7.4.140.0120.00517.86
7.4.130.0070.01316.57
7.4.120.0090.00716.47
7.4.110.0080.00816.79
7.4.100.0130.01016.34
7.4.90.0160.00316.50
7.4.80.0100.01319.39
7.4.70.0060.01616.57
7.4.60.0070.01016.43
7.4.50.0000.00416.64
7.4.40.0100.01016.64
7.4.30.0060.00916.56
7.4.00.0000.01315.03
7.3.330.0040.00213.16
7.3.320.0000.00513.18
7.3.310.0070.00016.15
7.3.300.0030.00316.32
7.3.290.0030.01016.29
7.3.280.0110.00616.34
7.3.270.0110.00617.40
7.3.260.0110.00616.47
7.3.250.0070.01016.47
7.3.240.0100.00716.39
7.3.230.0200.00316.55
7.3.210.0030.01316.20
7.3.200.0100.01319.39
7.3.190.0080.00916.48
7.3.180.0030.01216.45
7.3.170.0040.01616.39
7.3.160.0030.01316.53
7.3.120.0030.01014.98
7.3.10.0070.00316.78
7.3.00.0090.00316.66
7.2.330.0130.01016.42
7.2.320.0030.01816.36
7.2.310.0050.01116.64
7.2.300.0100.00616.34
7.2.290.0060.01316.70
7.2.130.0030.00616.86
7.2.120.0030.00716.87
7.2.110.0040.00716.89
7.2.100.0030.00916.86
7.2.90.0060.00316.71
7.2.80.0070.00417.00
7.2.70.0000.01116.95
7.2.60.0060.00916.66
7.2.50.0030.00716.77
7.2.40.0080.00416.80
7.2.30.0030.01017.08
7.2.20.0030.01016.72
7.2.10.0030.00616.82
7.2.00.0030.00718.00
7.1.250.0070.00715.66
7.1.100.0040.00418.09
7.1.70.0000.00816.89
7.1.60.0030.02019.70
7.1.50.0100.01016.73
7.1.00.0070.07322.51
7.0.200.0030.00716.72
7.0.140.0100.06722.16
7.0.60.0000.04320.03
7.0.50.0100.06717.90
7.0.40.0100.03720.07
7.0.30.0370.07720.02
7.0.20.0300.08020.00
7.0.10.0130.05320.30
7.0.00.0070.06320.12
5.6.280.0030.06721.06
5.6.210.0230.06720.55
5.6.200.0170.07018.19
5.6.190.0100.05020.66
5.6.180.0230.07020.36
5.6.170.0370.07320.46
5.6.160.0070.04020.38
5.6.150.0070.08318.18
5.6.140.0170.07018.19
5.6.130.0030.05018.05
5.6.120.0100.04320.87
5.6.110.0070.08321.08
5.6.100.0100.04021.12
5.6.90.0000.04721.10
5.6.80.0100.08320.38
5.5.350.0270.07320.41
5.5.340.0130.07317.93
5.5.330.0030.08720.40
5.5.320.0470.06720.13
5.5.310.0300.07720.20
5.5.300.0100.07717.98
5.5.290.0000.04718.00
5.5.280.0030.04020.76
5.5.270.0130.07320.84
5.5.260.0130.03020.96
5.5.250.0130.04720.46
5.5.240.0130.08020.25
5.4.450.0370.04329.32
5.4.440.0200.04029.29
5.4.430.0530.04328.69
5.4.420.0330.05026.63
5.4.410.0300.05324.11
5.4.400.0370.03722.40
5.4.390.0330.04021.68
5.4.380.1000.05718.59
5.4.370.0230.06018.75
5.4.360.0300.05018.76
5.4.350.0330.05018.68
5.4.340.0400.04318.67
5.4.320.0040.03712.45
5.4.310.0080.03412.45
5.4.300.0050.03612.45
5.4.290.0040.04112.45
5.4.280.0090.03712.34
5.4.270.0060.04012.34
5.4.260.0110.03812.34
5.4.250.0080.03612.34
5.4.240.0100.03512.34
5.4.230.0050.03712.34
5.4.220.0050.03712.34
5.4.210.0090.03312.34
5.4.200.0060.03812.34
5.4.190.0060.03612.34
5.4.180.0040.04012.34
5.4.170.0090.03412.35
5.4.160.0080.04712.34
5.4.150.0080.03412.34
5.4.140.0060.03712.02
5.4.130.0060.03612.01
5.4.120.0040.03911.97
5.4.110.0040.03711.96
5.4.100.0080.03511.96
5.4.90.0080.04011.96
5.4.80.0060.03711.96
5.4.70.0100.03411.96
5.4.60.0050.04011.96
5.4.50.0080.03811.96
5.4.40.0060.03511.95
5.4.30.0060.03511.95
5.4.20.0070.03611.95
5.4.10.0060.03511.95
5.4.00.0090.03311.44
5.3.290.0060.04812.80
5.3.280.0050.04012.71
5.3.270.0100.03512.72
5.3.260.0080.03712.72
5.3.250.0050.04712.72
5.3.240.0090.03512.72
5.3.230.0070.03712.71
5.3.220.0060.03712.68
5.3.210.0090.03712.68
5.3.200.0020.04312.68
5.3.190.0080.03812.68
5.3.180.0080.03612.67
5.3.170.0070.03612.67
5.3.160.0070.03812.68
5.3.150.0080.03812.68
5.3.140.0050.04012.66
5.3.130.0100.03912.66
5.3.120.0080.03912.66
5.3.110.0090.04212.65
5.3.100.0090.04412.12
5.3.90.0060.04212.08
5.3.80.0090.03712.07
5.3.70.0060.03612.08
5.3.60.0060.03612.06
5.3.50.0070.03712.00
5.3.40.0030.03912.00
5.3.30.0060.04011.94
5.3.20.0090.03211.72
5.3.10.0060.03511.69
5.3.00.0080.03411.68
5.2.170.0050.0319.18
5.2.160.0090.0259.18
5.2.150.0070.0299.18
5.2.140.0030.0329.18
5.2.130.0050.0299.13
5.2.120.0040.0299.13
5.2.110.0060.0339.14
5.2.100.0020.0319.14
5.2.90.0040.0309.14
5.2.80.0060.0289.14
5.2.70.0050.0329.13
5.2.60.0030.0319.09
5.2.50.0050.0309.05
5.2.40.0040.0369.04
5.2.30.0080.0289.01
5.2.20.0090.0329.00
5.2.10.0070.0268.92
5.2.00.0080.0298.78
5.1.60.0040.0238.06
5.1.50.0030.0368.06
5.1.40.0090.0278.04
5.1.30.0050.0258.39
5.1.20.0060.0268.41
5.1.10.0070.0268.14
5.1.00.0060.0238.14
5.0.50.0040.0206.61
5.0.40.0020.0206.48
5.0.30.0030.0366.29
5.0.20.0030.0206.26
5.0.10.0020.0296.24
5.0.00.0020.0326.23
4.4.90.0040.0144.77
4.4.80.0020.0164.76
4.4.70.0040.0204.76
4.4.60.0050.0164.75
4.4.50.0030.0154.77
4.4.40.0020.0254.71
4.4.30.0030.0184.75
4.4.20.0040.0174.85
4.4.10.0060.0154.85
4.4.00.0000.0274.76
4.3.110.0060.0124.67
4.3.100.0020.0174.66
4.3.90.0040.0194.63
4.3.80.0020.0264.58
4.3.70.0020.0164.63
4.3.60.0010.0164.62
4.3.50.0030.0184.62
4.3.40.0040.0274.54
4.3.30.0040.0193.28
4.3.20.0050.0233.26
4.3.10.0020.0223.22
4.3.00.0030.01721.57

preferences:
61.04 ms | 401 KiB | 5 Q