3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime( true ); $fp = fopen( 'http://www.amazon.co.uk/', 'r' ); $open = microtime( true ); stream_set_blocking( $fp, 1 ); $block = microtime( true ); $data = fread( $fp, 2048 ); $read = microtime( true ); // the time taken to open the url echo "Open: " . ($open-$start) . "\n"; // the time taken to set the stream to blocking echo "Block: " . ($block-$open) . "\n"; // the time taken to read from the the stream echo "Read: " . ($read-$block) . "\n"; // the amount of data read echo "Data Read: " . strlen( $data ) . "\n";

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)
7.2.00.0080.00819.67
7.1.70.0040.00417.50
7.1.60.0000.01117.41
7.1.50.0060.01517.45
7.1.00.0030.07722.62
7.0.200.0030.01017.08
7.0.140.0070.06722.52
7.0.120.0200.07322.41
7.0.110.0100.06322.30
7.0.100.0070.05722.25
7.0.90.0070.08722.34
7.0.80.0100.07722.32
7.0.70.0070.04322.43
7.0.60.0030.05022.46
7.0.50.0000.07722.38
7.0.40.0100.07020.30
7.0.30.0100.06720.34
7.0.20.0030.03320.55
7.0.10.0000.04320.27
7.0.00.0030.05720.27
5.6.280.0070.07021.49
5.6.270.0070.06021.54
5.6.260.0070.04721.22
5.6.250.0100.08321.43
5.6.240.0100.06321.21
5.6.230.0030.05021.16
5.6.220.0030.05021.45
5.6.210.0030.08721.30
5.6.200.0000.05721.32
5.6.190.0100.09021.17
5.6.180.0070.08721.27
5.6.170.0070.04321.49
5.6.160.0000.04321.28
5.6.150.0000.06321.30
5.6.140.0130.07721.08
5.6.130.0100.06021.07
5.6.120.0070.04721.10
5.6.110.0030.04021.09
5.6.100.0100.07021.09
5.6.90.0100.04721.48
5.6.80.0030.04720.61
5.6.70.0070.03720.59
5.6.60.0000.04320.66
5.6.50.0070.03020.55
5.6.40.0100.03020.86
5.6.30.0030.04720.71
5.6.20.0100.03320.68
5.6.10.0030.04020.76
5.6.00.0100.03320.61
5.5.380.0070.08018.14
5.5.370.0130.07317.80
5.5.360.0000.07018.06
5.5.350.0070.05718.06
5.5.340.0070.08018.38
5.5.330.0070.07718.64
5.5.320.0000.06318.25
5.5.310.0070.05318.36
5.5.300.0230.06018.67
5.5.290.0030.04318.24
5.5.280.0030.05718.36
5.5.270.0000.04318.57
5.5.260.0130.06018.67
5.5.250.0100.05018.41
5.5.240.0100.05317.96
5.5.230.0030.04317.78
5.5.220.0030.03017.63
5.5.210.0030.03717.73
5.5.200.0030.06017.93
5.5.190.0000.04017.75
5.5.180.0000.04017.64
5.5.160.0030.03717.71
5.5.150.0030.03717.70
5.5.140.0030.04717.72
5.5.130.0030.03717.59
5.5.120.0100.03017.60
5.5.110.0000.04017.70
5.5.100.0030.04017.71
5.5.90.0030.03717.70
5.5.80.0000.03717.55
5.5.70.0030.05317.78
5.5.60.0000.05717.49
5.5.50.0030.03317.48
5.5.40.0000.04017.54
5.5.30.0100.06017.60
5.5.20.0100.03017.53
5.5.10.0000.05717.49
5.5.00.0070.03317.84
5.4.450.0100.06319.82
5.4.440.0030.04019.59
5.4.430.0100.04719.53
5.4.420.0070.06020.00
5.4.410.0000.04019.40
5.4.400.0030.05019.14
5.4.390.0030.04719.51
5.4.380.0000.04019.23
5.4.370.0030.03719.50
5.4.360.0100.05719.41
5.4.350.0130.02319.20
5.4.340.0100.03319.19
5.4.320.0000.04319.58
5.4.310.0030.03719.27
5.4.300.0000.03719.35
5.4.290.0000.04019.50
5.4.280.0030.03019.44
5.4.270.0000.04019.44
5.4.260.0030.03719.22
5.4.250.0070.03019.44
5.4.240.0000.04019.17
5.4.230.0030.05719.21
5.4.220.0030.05019.57
5.4.210.0030.06319.44
5.4.200.0030.08019.35
5.4.190.0100.05719.13
5.4.180.0070.06319.34
5.4.170.0000.07019.65
5.4.160.0070.04319.47
5.4.150.0030.03719.64
5.4.140.0000.03716.98
5.4.130.0170.02016.93
5.4.120.0000.04316.61
5.4.110.0030.03316.98
5.4.100.0000.03316.63
5.4.90.0000.04016.72
5.4.80.0000.03316.70
5.4.70.0030.04316.65
5.4.60.0000.03716.65
5.4.50.0030.03716.78
5.4.40.0070.03016.64
5.4.30.0100.03016.76
5.4.20.0070.03716.79
5.4.10.0030.06316.79
5.4.00.0030.03716.25
5.3.290.0030.03714.95
5.3.280.0030.03314.77
5.3.270.0000.04014.95
5.3.260.0030.03714.78
5.3.250.0030.04314.89
5.3.240.0030.04315.04
5.3.230.0000.05014.82
5.3.220.0000.06014.78
5.3.210.0030.03714.85
5.3.200.0070.03014.90
5.3.190.0000.06015.00
5.3.180.0000.05014.91
5.3.170.0070.06314.84
5.3.160.0100.03014.84
5.3.150.0000.04014.75
5.3.140.0070.03314.70
5.3.130.0000.04714.72
5.3.120.0070.07014.54
5.3.110.0200.06314.77
5.3.100.0100.05714.32
5.3.90.0170.05314.14
5.3.80.0070.04714.35
5.3.70.0070.05314.19
5.3.60.0000.05314.28
5.3.50.0100.05014.21
5.3.40.0100.07314.23
5.3.30.0030.06014.03
5.3.20.0100.05713.86
5.3.10.0000.04013.92
5.3.00.0030.07313.98
5.2.170.0030.06311.42
5.2.160.0070.03711.29
5.2.150.0070.05711.43
5.2.140.0100.03311.47
5.2.130.0100.03311.31
5.2.120.0070.05311.28
5.2.110.0070.02711.31
5.2.100.0100.06011.32
5.2.90.0000.06311.21
5.2.80.0030.04011.38
5.2.70.0030.05711.38
5.2.60.0070.04711.18
5.2.50.0100.05011.23
5.2.40.0000.05711.14
5.2.30.0030.03711.07
5.2.20.0030.03710.95
5.2.10.0070.05711.00
5.2.00.0170.04011.14
5.1.60.0030.03010.14
5.1.50.0100.04310.39
5.1.40.0030.03010.28
5.1.30.0000.06710.76
5.1.20.0000.03710.56
5.1.10.0030.03010.56
5.1.00.0100.05010.23
5.0.50.0000.0439.68
5.0.40.0030.0379.68
5.0.30.0030.0639.68
5.0.20.0070.0409.68
5.0.10.0000.0309.68
5.0.00.0000.0379.68
4.4.90.0000.0379.68
4.4.80.0000.0179.68
4.4.70.0030.0309.68
4.4.60.0000.0279.68
4.4.50.0030.0139.68
4.4.40.0070.0509.68
4.4.30.0000.0209.68
4.4.20.0070.0279.68
4.4.10.0030.0139.68
4.4.00.0070.0509.68
4.3.110.0030.0379.68
4.3.100.0030.0309.68
4.3.90.0000.0179.68
4.3.80.0000.0309.68
4.3.70.0030.0139.68
4.3.60.0100.0239.68
4.3.50.0030.0179.68
4.3.40.0030.0209.68
4.3.30.0000.0379.68
4.3.20.0000.0339.68
4.3.10.0000.0279.68
4.3.00.0000.0179.68

preferences:
34.17 ms | 400 KiB | 5 Q