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.0fEYbaWK.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.40.0070.00718.87
8.3.30.0100.00619.13
8.3.20.0050.00220.30
8.3.10.0040.00423.61
8.3.00.0040.00419.38
8.2.170.0100.01022.96
8.2.160.0140.00020.34
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0080.00021.11
8.2.110.0090.00020.57
8.2.100.0110.00018.09
8.2.90.0020.00719.26
8.2.80.0000.00817.97
8.2.70.0050.00517.63
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0000.00718.15
8.2.30.0000.00818.12
8.2.20.0040.00417.74
8.2.10.0040.00418.10
8.2.00.0080.00017.73
8.1.270.0090.00023.79
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00322.13
8.1.230.0070.00319.02
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0060.00317.13
8.1.190.0000.00817.22
8.1.180.0080.00018.10
8.1.170.0030.00518.62
8.1.160.0040.00422.07
8.1.150.0080.00018.76
8.1.140.0040.00417.36
8.1.130.0040.00417.73
8.1.120.0040.00417.35
8.1.110.0040.00417.36
8.1.100.0030.00417.38
8.1.90.0030.00317.44
8.1.80.0040.00417.42
8.1.70.0000.00717.41
8.1.60.0040.00417.46
8.1.50.0040.00417.51
8.1.40.0050.00217.47
8.1.30.0000.00817.57
8.1.20.0080.00017.64
8.1.10.0050.00217.43
8.1.00.0040.00417.54
8.0.300.0030.00618.77
8.0.290.0050.00216.75
8.0.280.0070.00018.44
8.0.270.0070.00017.16
8.0.260.0040.00417.30
8.0.250.0030.00317.02
8.0.240.0040.00416.88
8.0.230.0000.00816.97
8.0.220.0030.00316.87
8.0.210.0030.00316.92
8.0.200.0030.00316.98
8.0.190.0050.00316.97
8.0.180.0000.00717.01
8.0.170.0000.00816.97
8.0.160.0000.00716.95
8.0.150.0040.00416.96
8.0.140.0000.00816.78
8.0.130.0030.00313.45
8.0.120.0080.00016.91
8.0.110.0070.00016.93
8.0.100.0000.00717.00
8.0.90.0000.00816.84
8.0.80.0090.00916.90
8.0.70.0000.00717.01
8.0.60.0040.00416.88
8.0.50.0000.00716.99
8.0.30.0060.01417.20
8.0.20.0120.00817.40
8.0.10.0040.00416.91
8.0.00.0100.00916.72
7.4.330.0030.00315.00
7.4.320.0030.00316.50
7.4.300.0050.00216.50
7.4.290.0030.00316.59
7.4.280.0040.00416.48
7.4.270.0060.00316.53
7.4.260.0080.00316.51
7.4.250.0040.00416.48
7.4.240.0020.00516.48
7.4.230.0000.00716.41
7.4.220.0070.01016.49
7.4.210.0100.01016.63
7.4.200.0070.00016.48
7.4.160.0110.00616.71
7.4.150.0100.00717.40
7.4.140.0120.01217.86
7.4.130.0150.00216.51
7.4.120.0060.01116.53
7.4.110.0070.01416.70
7.4.100.0090.01216.71
7.4.90.0060.01016.40
7.4.80.0120.00619.39
7.4.70.0100.00616.36
7.4.60.0060.01216.32
7.4.50.0000.00416.47
7.4.40.0050.01116.48
7.4.30.0090.00616.49
7.4.10.0060.00915.17
7.4.00.0110.00814.81
7.3.330.0050.00013.26
7.3.320.0030.00313.17
7.3.310.0030.00316.18
7.3.300.0030.00316.24
7.3.290.0030.01416.35
7.3.280.0050.01016.34
7.3.270.0040.01417.40
7.3.260.0070.01016.54
7.3.250.0080.01216.51
7.3.240.0070.01016.54
7.3.230.0080.00816.56
7.3.210.0140.00816.39
7.3.200.0040.01519.39
7.3.190.0110.00616.54
7.3.180.0030.01516.49
7.3.170.0120.00316.37
7.3.160.0060.00916.49
7.3.130.0030.01614.94
7.3.120.0070.01014.85
7.3.110.0100.00914.86
7.3.100.0030.01214.93
7.3.90.0070.00714.96
7.3.80.0050.01214.76
7.3.70.0100.00514.83
7.3.60.0090.00414.60
7.3.50.0040.00714.90
7.3.40.0040.01114.88
7.3.30.0080.00514.79
7.3.20.0070.00716.71
7.3.10.0090.00316.79
7.3.00.0070.00616.79
7.2.330.0140.00316.66
7.2.320.0080.00816.39
7.2.310.0120.01216.85
7.2.300.0100.00716.51
7.2.290.0090.00916.58
7.2.260.0070.01115.20
7.2.250.0100.00814.92
7.2.240.0080.01015.07
7.2.230.0070.00715.04
7.2.220.0100.00415.03
7.2.210.0020.01414.98
7.2.200.0030.00914.90
7.2.190.0030.01014.86
7.2.180.0080.00614.97
7.2.170.0050.00815.06
7.2.160.0060.00314.94
7.2.150.0030.01016.79
7.2.140.0160.00016.98
7.2.130.0070.01016.90
7.2.120.0100.00316.70
7.2.110.0100.00316.90
7.2.100.0080.00616.88
7.2.90.0030.00717.09
7.2.80.0070.00316.58
7.2.70.0070.00416.82
7.2.60.0070.00716.57
7.2.50.0000.00816.54
7.2.40.0030.00617.07
7.2.30.0060.00316.64
7.2.20.0070.00717.14
7.2.10.0090.00917.06
7.2.00.0020.01218.24
7.1.330.0080.00715.66
7.1.320.0030.01015.68
7.1.310.0020.00815.82
7.1.300.0040.01115.43
7.1.290.0080.00515.71
7.1.280.0080.00715.84
7.1.270.0050.01115.68
7.1.260.0060.00815.62
7.1.250.0030.01015.88
7.1.240.0090.00315.56
7.1.230.0070.00715.52
7.1.220.0060.00615.79
7.1.210.0070.00715.47
7.1.200.0070.00415.49
7.1.190.0040.00415.63
7.1.180.0040.00415.73
7.1.170.0040.01115.80
7.1.160.0060.00615.86
7.1.150.0090.00615.67
7.1.140.0130.00015.79
7.1.130.0110.00415.85
7.1.120.0040.00715.81
7.1.110.0060.00615.77
7.1.100.0070.01015.63
7.1.90.0120.00315.41
7.1.80.0120.00615.64
7.1.70.0030.01016.42
7.1.60.0110.00517.74
7.1.50.0080.01016.13
7.1.40.0070.00415.75
7.1.30.0090.00615.60
7.1.20.0090.00915.78
7.1.10.0000.01215.50
7.1.00.0030.04119.26
7.0.330.0060.00615.43
7.0.320.0030.00715.35
7.0.310.0000.01315.04
7.0.300.0000.00815.50
7.0.290.0060.00615.39
7.0.280.0000.00815.23
7.0.270.0030.00715.33
7.0.260.0070.00415.09
7.0.250.0050.00515.46
7.0.240.0040.01515.38
7.0.230.0070.01115.23
7.0.220.0150.00315.55
7.0.210.0090.00915.68
7.0.200.0000.01015.93
7.0.190.0070.00715.15
7.0.180.0000.01315.48
7.0.170.0100.00715.18
7.0.160.0060.01015.24
7.0.150.0000.01415.16
7.0.140.0060.03918.78
7.0.130.0030.00615.61
7.0.120.0060.00915.27
7.0.110.0060.00615.21
7.0.100.0030.00515.56
7.0.90.0060.00615.59
7.0.80.0030.00715.16
7.0.70.0060.00615.50
7.0.60.0030.03317.64
7.0.50.0030.03216.57
7.0.40.0070.02616.71
7.0.30.0320.03516.86
7.0.20.0230.04016.78
7.0.10.0020.05216.88
7.0.00.0020.02816.67
5.6.400.0060.00914.44
5.6.390.0080.00014.63
5.6.380.0030.00514.72
5.6.370.0060.00314.31
5.6.360.0030.00814.74
5.6.350.0040.01114.16
5.6.340.0030.00714.66
5.6.330.0000.01414.63
5.6.320.0070.00714.30
5.6.310.0030.00914.28
5.6.300.0070.00414.62
5.6.290.0100.00714.32
5.6.280.0030.04017.72
5.6.270.0090.00614.29
5.6.260.0090.00614.28
5.6.250.0040.00714.67
5.6.240.0060.00314.68
5.6.230.0090.00614.40
5.6.220.0040.00414.16
5.6.210.0130.03017.54
5.6.200.0020.04616.22
5.6.190.0020.02617.60
5.6.180.0230.03317.40
5.6.170.0220.04417.34
5.6.160.0110.04317.41
5.6.150.0110.03016.25
5.6.140.0050.03816.29
5.6.130.0070.02116.30
5.6.120.0070.04717.70
5.6.110.0020.04717.77
5.6.100.0120.04017.76
5.6.90.0030.04717.83
5.6.80.0070.04417.39
5.6.70.0030.01013.98
5.6.60.0060.00614.38
5.6.50.0100.00314.24
5.6.40.0040.00414.21
5.6.30.0030.01414.05
5.6.20.0060.00914.29
5.6.10.0080.00414.44
5.6.00.0030.01014.21
5.5.380.0030.01014.18
5.5.370.0070.00414.35
5.5.360.0030.00914.28
5.5.350.0150.03417.52
5.5.340.0050.03716.15
5.5.330.0050.02417.21
5.5.320.0150.03017.39
5.5.310.0220.04017.38
5.5.300.0070.02716.09
5.5.290.0070.03816.11
5.5.280.0090.02417.74
5.5.270.0070.04617.64
5.5.260.0090.04217.53
5.5.250.0080.04217.48
5.5.240.0020.04817.28
5.5.230.0070.00714.03
5.5.220.0000.01014.31
5.5.210.0100.00014.16
5.5.200.0030.01414.56
5.5.190.0090.00614.16
5.5.180.0000.01114.19
5.5.170.0100.00314.54
5.5.160.0030.01014.55
5.5.150.0040.01113.79
5.5.140.0000.01114.10
5.5.130.0000.01314.52
5.5.120.0030.01014.20
5.5.110.0000.00814.36
5.5.100.0060.01013.93
5.5.90.0060.00314.34
5.5.80.0060.00613.80
5.5.70.0000.01514.32
5.5.60.0090.00614.16
5.5.50.0070.00714.46
5.5.40.0000.01114.11
5.5.30.0070.00714.42
5.5.20.0070.00713.74
5.5.10.0030.00914.45
5.5.00.0000.01413.91
5.4.450.0200.02315.73
5.4.440.0350.02615.76
5.4.430.0170.02615.81
5.4.420.0300.02215.81
5.4.410.0120.02615.71
5.4.400.0080.02715.58
5.4.390.0180.02315.57
5.4.380.0250.02315.39
5.4.370.0180.03515.35
5.4.360.0150.03015.38
5.4.350.0170.03215.35
5.4.340.0230.02515.32
5.4.330.0060.00012.06
5.4.320.0060.02312.25
5.4.310.0080.02112.25
5.4.300.0030.02412.26
5.4.290.0070.02012.25
5.4.280.0040.02212.20
5.4.270.0040.02412.20
5.4.260.0040.03012.20
5.4.250.0090.02612.20
5.4.240.0050.02312.20
5.4.230.0060.01912.20
5.4.220.0020.02112.20
5.4.210.0080.02112.20
5.4.200.0040.02512.20
5.4.190.0030.02312.20
5.4.180.0060.02012.20
5.4.170.0080.01912.20
5.4.160.0100.01812.20
5.4.150.0050.02212.20
5.4.140.0070.02112.04
5.4.130.0060.01912.04
5.4.120.0060.02112.01
5.4.110.0030.02212.01
5.4.100.0060.02012.01
5.4.90.0040.02512.01
5.4.80.0070.02012.01
5.4.70.0070.01912.01
5.4.60.0050.02112.01
5.4.50.0080.01912.01
5.4.40.0070.02212.00
5.4.30.0080.02112.00
5.4.20.0040.02412.00
5.4.10.0070.02012.00
5.4.00.0080.02111.75
5.3.290.0100.04712.80
5.3.280.0070.05112.71
5.3.270.0070.04112.72
5.3.260.0080.04412.72
5.3.250.0050.04012.72
5.3.240.0080.05112.72
5.3.230.0080.04612.71
5.3.220.0100.05212.68
5.3.210.0060.05212.68
5.3.200.0080.03712.68
5.3.190.0050.03912.68
5.3.180.0060.03712.68
5.3.170.0050.03812.67
5.3.160.0060.03812.67
5.3.150.0070.03512.67
5.3.140.0040.03712.66
5.3.130.0080.03612.65
5.3.120.0060.03812.66
5.3.110.0100.04812.66
5.3.100.0090.04912.12
5.3.90.0050.03812.09
5.3.80.0060.03812.07
5.3.70.0100.03512.07
5.3.60.0090.04012.06
5.3.50.0060.04412.00
5.3.40.0110.04012.00
5.3.30.0080.03911.95
5.3.20.0080.03611.72
5.3.10.0080.03311.69
5.3.00.0070.04611.68
5.2.170.0070.0339.17
5.2.160.0050.0299.18
5.2.150.0040.0319.18
5.2.140.0050.0319.17
5.2.130.0040.0369.14
5.2.120.0070.0339.13
5.2.110.0060.0379.14
5.2.100.0060.0319.14
5.2.90.0050.0299.14
5.2.80.0050.0309.13
5.2.70.0040.0309.13
5.2.60.0050.0309.09
5.2.50.0080.0299.05
5.2.40.0060.0319.03
5.2.30.0020.0359.01
5.2.20.0040.0318.99
5.2.10.0070.0348.93
5.2.00.0060.0278.78
5.1.60.0040.0248.06
5.1.50.0070.0258.06
5.1.40.0050.0238.04
5.1.30.0040.0338.39
5.1.20.0030.0338.41
5.1.10.0050.0248.14
5.1.00.0030.0268.14
5.0.50.0030.0206.62
5.0.40.0030.0196.48
5.0.30.0030.0316.29
5.0.20.0000.0226.25
5.0.10.0040.0196.24
5.0.00.0040.0306.23
4.4.90.0010.0174.78
4.4.80.0010.0164.76
4.4.70.0030.0154.76
4.4.60.0050.0164.75
4.4.50.0030.0204.77
4.4.40.0020.0284.71
4.4.30.0030.0154.76
4.4.20.0010.0174.85
4.4.10.0030.0154.85
4.4.00.0020.0314.76
4.3.110.0030.0224.67
4.3.100.0030.0184.67
4.3.90.0020.0154.63
4.3.80.0010.0264.58
4.3.70.0030.0164.63
4.3.60.0020.0184.63
4.3.50.0040.0144.62
4.3.40.0030.0234.54
4.3.30.0020.0163.29
4.3.20.0020.0153.26
4.3.10.0040.0143.22
4.3.00.0070.01018.41

preferences:
43.53 ms | 400 KiB | 5 Q