3v4l.org

run code in 300+ PHP versions simultaneously
<?php $host = "100.42.56.12"; $port = 7777; $message = "Hello Server"; echo "Message To server :".$message; // create socket $socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n"); // connect to server $result = socket_connect($socket, $host, $port) or die("Could not connect to server\n"); // send string to server socket_write($socket, $message, strlen($message)) or die("Could not send data to server\n"); // get server response $result = socket_read ($socket, 1024) or die("Could not read server response\n"); echo "Reply From Server :".$result; // close socket socket_close($socket);

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.0100.01018.88
8.3.30.0140.00418.76
8.3.20.0080.00020.21
8.3.10.0030.00620.72
8.3.00.0040.00423.65
8.2.170.0180.00022.96
8.2.160.0100.00322.19
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0000.00820.78
8.2.120.0040.00426.35
8.2.110.0030.00619.39
8.2.100.0060.00617.91
8.2.90.0000.00819.22
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0040.00417.80
8.2.50.0060.00318.09
8.2.40.0090.00020.41
8.2.30.0000.00719.42
8.2.20.0040.00417.62
8.2.10.0080.00018.14
8.2.00.0080.00018.04
8.1.270.0060.00922.19
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0030.00621.16
8.1.230.0110.00017.45
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0090.00017.38
8.1.190.0040.00417.35
8.1.180.0000.00718.10
8.1.170.0060.00318.56
8.1.160.0040.00420.72
8.1.150.0040.00418.83
8.1.140.0080.00019.57
8.1.130.0030.00317.52
8.1.120.0040.00417.42
8.1.110.0070.00017.29
8.1.100.0040.00417.46
8.1.90.0000.00817.37
8.1.80.0040.00417.35
8.1.70.0000.00717.30
8.1.60.0040.00417.58
8.1.50.0000.00817.38
8.1.40.0040.00417.41
8.1.30.0030.00617.65
8.1.20.0000.00717.61
8.1.10.0050.00217.63
8.1.00.0000.00817.47
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.32
8.0.270.0070.00017.26
8.0.260.0030.00317.26
8.0.250.0060.00016.91
8.0.240.0030.00317.04
8.0.230.0070.00016.91
8.0.220.0030.00616.93
8.0.210.0030.00316.95
8.0.200.0000.00617.04
8.0.190.0000.00717.00
8.0.180.0000.00717.05
8.0.170.0050.00317.01
8.0.160.0000.00717.09
8.0.150.0040.00316.80
8.0.140.0080.00016.78
8.0.130.0000.00613.45
8.0.120.0050.00316.92
8.0.110.0000.00716.82
8.0.100.0040.00417.02
8.0.90.0020.00516.75
8.0.80.0030.01216.88
8.0.70.0070.00016.76
8.0.60.0050.00316.76
8.0.50.0050.00216.94
8.0.30.0050.01217.13
8.0.20.0120.00917.40
8.0.10.0040.00417.13
8.0.00.0060.01116.80
7.4.330.0060.00016.77
7.4.320.0030.00316.50
7.4.300.0030.00316.49
7.4.290.0070.00016.56
7.4.280.0030.00616.51
7.4.270.0080.00016.59
7.4.260.0030.00316.59
7.4.250.0030.00316.46
7.4.240.0040.00416.54
7.4.230.0050.00216.59
7.4.220.0040.01316.47
7.4.210.0070.00716.53
7.4.200.0070.00016.59
7.4.160.0090.00616.49
7.4.150.0130.00617.40
7.4.140.0150.00917.86
7.4.130.0150.00816.52
7.4.120.0080.01016.66
7.4.110.0130.00316.44
7.4.100.0100.00716.43
7.4.90.0070.01016.49
7.4.80.0060.01219.39
7.4.70.0060.00916.57
7.4.60.0070.01016.58
7.4.50.0090.00616.36
7.4.40.0070.01016.53
7.4.30.0060.01216.50
7.4.10.0130.00615.08
7.4.00.0030.01314.97
7.3.330.0030.00313.18
7.3.320.0000.00513.25
7.3.310.0000.00716.35
7.3.300.0000.00916.32
7.3.290.0050.00216.31
7.3.280.0090.01116.32
7.3.270.0040.01417.40
7.3.260.0000.01616.53
7.3.250.0100.00916.40
7.3.240.0130.00816.43
7.3.230.0140.00616.51
7.3.210.0090.00616.48
7.3.200.0150.00619.39
7.3.190.0000.01516.21
7.3.180.0150.00316.41
7.3.170.0030.01416.62
7.3.160.0060.00916.34
7.3.130.0030.01015.03
7.3.120.0060.01015.99
7.3.110.0050.01015.93
7.3.100.0030.01015.92
7.3.90.0070.00916.12
7.3.80.0060.00516.01
7.3.70.0090.00415.97
7.3.60.0030.01015.98
7.3.50.0020.00916.04
7.3.40.0100.00516.01
7.3.30.0070.00915.99
7.3.20.0060.01016.77
7.3.10.0050.00716.74
7.3.00.0040.01016.87
7.2.330.0030.01516.45
7.2.320.0130.00416.60
7.2.310.0120.00916.64
7.2.300.0000.01616.42
7.2.290.0130.00416.73
7.2.260.0120.00614.87
7.2.250.0070.01015.00
7.2.240.0080.00816.12
7.2.230.0040.01316.06
7.2.220.0060.00716.01
7.2.210.0030.01116.12
7.2.200.0110.00316.04
7.2.190.0080.00815.97
7.2.180.0060.00816.07
7.2.170.0070.00616.12
7.2.160.0060.00815.98
7.2.150.0050.00816.90
7.2.140.0050.01117.02
7.2.130.0050.01016.96
7.2.120.0070.00616.94
7.2.110.0090.00617.04
7.2.100.0090.00416.89
7.2.90.0030.01116.91
7.2.80.0080.00816.91
7.2.70.0070.00716.99
7.2.60.0060.00916.97
7.2.50.0060.00716.95
7.2.40.0080.00616.95
7.2.30.0050.00816.98
7.2.20.0080.00516.83
7.2.10.0060.00916.97
7.2.00.0070.00717.61
7.1.330.0070.00716.52
7.1.320.0070.00916.33
7.1.310.0020.01216.46
7.1.300.0040.00816.40
7.1.290.0050.00716.42
7.1.280.0050.00616.35
7.1.270.0060.00616.48
7.1.260.0050.00816.25
7.1.250.0050.00716.19
7.1.240.0090.00315.80
7.1.230.0030.00715.84
7.1.220.0070.00315.71
7.1.210.0000.01215.41
7.1.200.0060.00615.49
7.1.190.0000.00915.39
7.1.180.0040.00715.82
7.1.170.0000.00815.75
7.1.160.0040.00415.56
7.1.150.0080.00015.44
7.1.140.0000.00915.63
7.1.130.0070.00815.65
7.1.120.0060.00615.53
7.1.110.0060.00315.60
7.1.100.0040.01016.71
7.1.90.0030.01215.73
7.1.80.0040.00415.43
7.1.70.0030.00816.47
7.1.60.0080.00917.60
7.1.50.0060.01316.16
7.1.40.0030.00615.61
7.1.30.0050.00515.68
7.1.20.0040.00715.36
7.1.10.0030.01015.59
7.1.00.0020.04419.10
7.0.330.0110.00015.47
7.0.320.0060.00615.54
7.0.310.0040.00715.34
7.0.300.0070.00315.16
7.0.290.0030.01015.07
7.0.280.0030.00615.44
7.0.270.0030.00615.28
7.0.260.0040.00715.38
7.0.250.0040.00815.26
7.0.240.0030.01015.43
7.0.230.0030.01015.54
7.0.220.0000.01415.51
7.0.210.0060.00614.97
7.0.200.0270.00714.95
7.0.190.0060.00615.34
7.0.180.0050.00515.48
7.0.170.0030.00915.12
7.0.160.0030.00615.48
7.0.150.0030.00915.06
7.0.140.0100.00615.34
7.0.130.0110.00315.57
7.0.120.0070.00315.29
7.0.110.0030.00915.48
7.0.100.0070.00415.44
7.0.90.0120.00015.11
7.0.80.0070.00415.34
7.0.70.0070.00715.55
7.0.60.0150.04318.58
7.0.50.0040.04416.70
7.0.40.0100.02616.79
7.0.30.0080.02816.73
7.0.20.0170.03716.71
7.0.10.0030.03416.62
7.0.00.0030.02516.92
5.6.400.0090.00014.48
5.6.390.0090.00613.95
5.6.380.0080.00414.52
5.6.370.0000.00814.62
5.6.360.0060.00614.16
5.6.350.0000.01414.62
5.6.340.0040.00813.94
5.6.330.0080.00814.64
5.6.320.0030.01014.38
5.6.310.0080.00414.54
5.6.300.0090.00014.24
5.6.290.0030.00714.27
5.6.280.0040.00814.29
5.6.270.0100.00714.13
5.6.260.0040.00414.31
5.6.250.0030.01014.57
5.6.240.0070.00714.60
5.6.230.0000.01314.48
5.6.220.0030.01014.18
5.6.210.0170.03217.44
5.6.200.0050.03516.11
5.6.190.0120.04717.35
5.6.180.0170.03917.23
5.6.170.0150.03417.38
5.6.160.0060.04517.51
5.6.150.0040.03716.27
5.6.140.0080.04316.23
5.6.130.0030.04916.28
5.6.120.0050.04617.69
5.6.110.0090.04417.60
5.6.100.0050.02517.55
5.6.90.0110.04217.77
5.6.80.0050.03817.44
5.6.70.0120.00414.10
5.6.60.0060.00314.03
5.6.50.0070.00714.25
5.6.40.0030.00714.02
5.6.30.0030.00714.40
5.6.20.0070.00714.45
5.6.10.0000.00814.07
5.6.00.0030.00614.18
5.5.380.0070.01014.30
5.5.370.0100.00014.26
5.5.360.0070.00714.37
5.5.350.0100.03217.24
5.5.340.0030.02815.90
5.5.330.0070.03817.32
5.5.320.0320.03517.14
5.5.310.0100.02617.36
5.5.300.0080.04115.93
5.5.290.0050.04716.06
5.5.280.0050.04717.64
5.5.270.0080.04517.57
5.5.260.0060.04417.66
5.5.250.0050.03517.42
5.5.240.0150.03917.28
5.5.230.0140.00414.20
5.5.220.0030.01413.99
5.5.210.0110.00314.14
5.5.200.0000.01313.86
5.5.190.0070.00713.84
5.5.180.0060.00813.98
5.5.170.0040.00414.28
5.5.160.0030.01014.16
5.5.150.0040.01114.34
5.5.140.0090.00614.23
5.5.130.0040.00414.17
5.5.120.0000.00814.22
5.5.110.0000.01314.31
5.5.100.0060.00314.05
5.5.90.0080.00413.90
5.5.80.0060.00613.93
5.5.70.0130.00314.00
5.5.60.0060.00314.21
5.5.50.0080.00413.87
5.5.40.0090.00013.82
5.5.30.0140.00013.82
5.5.20.0040.00714.22
5.5.10.0100.00314.02
5.5.00.0030.01013.79
5.4.450.0830.05719.54
5.4.440.0700.06719.43
5.4.430.0770.04319.21
5.4.420.0630.06019.55
5.4.410.0670.05719.12
5.4.400.0700.07019.13
5.4.390.0570.06019.10
5.4.380.0700.06319.32
5.4.370.0700.07718.89
5.4.360.0730.05719.09
5.4.350.0800.04318.87
5.4.340.0970.07018.93
5.4.320.0770.05318.93
5.4.310.0870.04319.14
5.4.300.0730.05719.22
5.4.290.0770.04719.20
5.4.280.0700.04718.87
5.4.270.0670.05019.21
5.4.260.0700.05019.11
5.4.250.0770.05019.10
5.4.240.0770.08019.20
5.4.230.0670.05019.21
5.4.220.0670.05019.18
5.4.210.1000.05318.86
5.4.200.0900.05319.18
5.4.190.0870.04319.31
5.4.180.0730.06019.21
5.4.170.0770.05719.21
5.4.160.0730.05319.20
5.4.150.0770.05719.13
5.4.140.0630.05316.42
5.4.130.0870.05716.23
5.4.120.0800.05016.39
5.4.110.0600.05716.13
5.4.100.0800.05016.45
5.4.90.0900.04016.38
5.4.80.1000.05016.36
5.4.70.0800.05716.53
5.4.60.0730.07016.43
5.4.50.0930.04716.26
5.4.40.0130.04716.38
5.4.30.0200.04716.10
5.4.20.0170.04716.10
5.4.10.0100.05016.42
5.4.00.0100.04715.69
5.3.290.0670.05314.54
5.3.280.0670.05314.52
5.3.270.0670.05314.54
5.3.260.0930.06714.53
5.3.250.0730.06314.50
5.3.240.0700.06014.49
5.3.230.0700.04314.35
5.3.220.0830.04714.47
5.3.210.1000.05314.46
5.3.200.0970.06314.49
5.3.190.0800.04014.49
5.3.180.0770.05014.50
5.3.170.0830.05014.48
5.3.160.0830.04314.46
5.3.150.0800.07014.58
5.3.140.0330.04314.50
5.3.130.0270.05314.47
5.3.120.0130.05314.42
5.3.110.0070.05314.42
5.3.100.0100.05313.79
5.3.90.0100.05013.92
5.3.80.0100.05713.99
5.3.70.0170.04313.97
5.3.60.0030.05713.86
5.3.50.0000.05713.87
5.3.40.0570.05713.87
5.3.30.0370.04313.93
5.3.20.0130.05313.70
5.3.10.0170.04313.49
5.3.00.0300.04713.57
5.2.170.0070.04011.08
5.2.160.0470.03711.02
5.2.150.0600.04311.00
5.2.140.0270.03711.07
5.2.130.0070.04711.03
5.2.120.0130.03711.11
5.2.110.0200.04311.25
5.2.100.0170.04011.00
5.2.90.0070.04011.05
5.2.80.0230.04011.25
5.2.70.0130.04311.18
5.2.60.0470.04711.13
5.2.50.0200.03311.00
5.2.40.0070.04010.89
5.2.30.0200.04010.88
5.2.20.0600.04010.90
5.2.10.0530.04310.90
5.2.00.0230.03710.56
5.1.60.0170.0309.98
5.1.50.0070.0409.99
5.1.40.0070.0339.97
5.1.30.0170.03010.32
5.1.20.0070.04010.35
5.1.10.0070.03710.04
5.1.00.0200.0309.95
5.0.50.0070.0278.55
5.0.40.0070.0278.40
5.0.30.0100.0438.21
5.0.20.0070.0238.22
5.0.10.0070.0278.20
5.0.00.0130.0438.15
4.4.90.0370.0176.54
4.4.80.0100.0176.54
4.4.70.0300.0206.54
4.4.60.0330.0236.54
4.4.50.0330.0276.54
4.4.40.0170.0306.54
4.4.30.0030.0306.54
4.4.20.0070.0206.54
4.4.10.0000.0236.54
4.4.00.0100.0406.54
4.3.110.0070.0276.54
4.3.100.0070.0206.54
4.3.90.0030.0206.54
4.3.80.0100.0276.54
4.3.70.0030.0206.54
4.3.60.0030.0206.54
4.3.50.0030.0236.54
4.3.40.0100.0336.54
4.3.30.0070.0176.54
4.3.20.0070.0206.54
4.3.10.0100.0136.54
4.3.00.0070.0206.54

preferences:
50.28 ms | 400 KiB | 5 Q