3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Intercept extends php_user_filter { public static $cache = ''; public function filter($in, $out, &$consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { self::$cache .= $bucket->data; $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } } $out = fwrite(STDOUT, "Hello\n"); var_dump($out); stream_filter_register("intercept_filter", "Intercept"); stream_filter_append(STDOUT, "intercept_filter"); $out = fwrite(STDOUT, "Goodbye\n"); var_dump($out);

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.70.0120.00318.31
8.3.60.0100.00718.43
8.3.50.0070.01121.27
8.3.40.0040.01118.69
8.3.30.0110.00318.76
8.3.20.0040.00420.37
8.3.10.0050.00320.64
8.3.00.0080.00023.66
8.2.190.0110.00716.58
8.2.180.0120.00325.92
8.2.170.0070.00722.96
8.2.160.0070.01022.26
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0090.00021.12
8.2.120.0070.00026.35
8.2.110.0090.00022.19
8.2.100.0000.01217.97
8.2.90.0000.00817.75
8.2.80.0000.00817.97
8.2.70.0040.00417.93
8.2.60.0040.00417.93
8.2.50.0060.00318.10
8.2.40.0040.00420.64
8.2.30.0050.00219.32
8.2.20.0000.00818.13
8.2.10.0040.00418.13
8.2.00.0050.00317.80
8.1.280.0140.00425.92
8.1.270.0000.00722.14
8.1.260.0050.00228.09
8.1.250.0050.00228.09
8.1.240.0070.00423.62
8.1.230.0070.00421.04
8.1.220.0050.00317.78
8.1.210.0030.00618.77
8.1.200.0040.00417.38
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0040.00418.55
8.1.160.0050.00222.06
8.1.150.0030.00518.96
8.1.140.0000.00719.58
8.1.130.0030.00317.81
8.1.120.0000.00717.50
8.1.110.0030.00717.46
8.1.100.0040.00417.45
8.1.90.0080.00017.52
8.1.80.0030.00317.48
8.1.70.0060.00317.36
8.1.60.0030.00517.64
8.1.50.0030.00517.54
8.1.40.0040.00417.55
8.1.30.0030.00617.50
8.1.20.0040.00417.62
8.1.10.0040.00417.56
8.1.00.0020.00517.54
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0050.00318.38
8.0.270.0030.00316.67
8.0.260.0030.00317.42
8.0.250.0070.00017.00
8.0.240.0000.00616.89
8.0.230.0040.00416.86
8.0.220.0030.00316.86
8.0.210.0000.00716.75
8.0.200.0000.00616.84
8.0.190.0070.00016.91
8.0.180.0000.00816.92
8.0.170.0070.00016.80
8.0.160.0040.00316.87
8.0.150.0060.00316.74
8.0.140.0070.00416.86
8.0.130.0000.00613.30
8.0.120.0000.00816.75
8.0.110.0000.00716.88
8.0.100.0050.00216.88
8.0.90.0070.00017.00
8.0.80.0110.00416.93
8.0.70.0000.00916.79
8.0.60.0040.00416.91
8.0.50.0000.00816.76
8.0.30.0080.00816.99
8.0.20.0110.00817.41
8.0.10.0000.00816.96
8.0.00.0070.01016.74
7.4.330.0060.00015.08
7.4.320.0000.00616.59
7.4.300.0030.00316.57
7.4.290.0000.00716.50
7.4.280.0040.00416.51
7.4.270.0070.00016.41
7.4.260.0040.00416.53
7.4.250.0080.00016.46
7.4.240.0000.00716.61
7.4.230.0030.00316.40
7.4.220.0110.01116.49
7.4.210.0100.00816.61
7.4.200.0070.00016.69
7.4.160.0050.01016.44
7.4.150.0090.00917.40
7.4.140.0160.00917.86
7.4.130.0110.00716.52
7.4.120.0120.00516.46
7.4.110.0080.01016.42
7.4.100.0130.00316.54
7.4.90.0040.01316.54
7.4.80.0060.01519.39
7.4.70.0090.01316.41
7.4.60.0070.01516.70
7.4.50.0080.01116.46
7.4.40.0080.00816.54
7.4.30.0100.01016.62
7.4.10.0160.00314.80
7.4.00.0090.00715.00
7.3.330.0030.00313.22
7.3.320.0030.00313.34
7.3.310.0070.00016.35
7.3.300.0000.00716.18
7.3.290.0040.01116.30
7.3.280.0070.00916.28
7.3.270.0130.00417.40
7.3.260.0120.00716.27
7.3.250.0070.01016.36
7.3.240.0140.00716.33
7.3.230.0130.00316.39
7.3.210.0060.01316.41
7.3.200.0000.01816.51
7.3.190.0030.01616.40
7.3.180.0170.00016.48
7.3.170.0100.00716.32
7.3.160.0140.00716.21
7.3.130.0100.00714.69
7.3.120.0060.00914.42
7.3.110.0070.01114.63
7.3.100.0030.01014.72
7.3.90.0090.00614.74
7.3.80.0000.01314.48
7.3.70.0070.00714.66
7.3.60.0100.00714.90
7.3.50.0060.00614.83
7.3.40.0040.00814.66
7.3.30.0080.00814.46
7.3.20.0060.01016.53
7.3.10.0000.01516.78
7.3.00.0060.00616.57
7.2.330.0150.00816.77
7.2.320.0100.00716.38
7.2.310.0090.01516.59
7.2.300.0090.01016.73
7.2.290.0110.00716.71
7.2.260.0000.01715.09
7.2.250.0110.00714.74
7.2.240.0090.00614.95
7.2.230.0000.01214.71
7.2.220.0030.00814.90
7.2.210.0110.00314.80
7.2.200.0000.00914.99
7.2.190.0060.00914.74
7.2.180.0060.01215.17
7.2.170.0030.01014.86
7.2.160.0040.01114.87
7.2.150.0070.01117.04
7.2.140.0060.00916.98
7.2.130.0050.00516.82
7.2.120.0100.00316.83
7.2.110.0060.00916.79
7.2.100.0090.00616.63
7.2.90.0070.00716.84
7.2.80.0030.00916.96
7.2.70.0000.01616.97
7.2.60.0070.00616.91
7.2.50.0060.00316.97
7.2.40.0100.00316.88
7.2.30.0030.00716.61
7.2.20.0080.00416.95
7.2.10.0070.01016.82
7.2.00.0000.01216.93
7.1.330.0060.00915.42
7.1.320.0000.01115.76
7.1.310.0030.00715.75
7.1.300.0060.00915.61
7.1.290.0000.01215.73
7.1.280.0000.01415.66
7.1.270.0040.00715.77
7.1.260.0040.01115.74
7.1.250.0000.00815.93
7.1.240.0110.00415.77
7.1.230.0060.00915.50
7.1.220.0040.00715.50
7.1.210.0070.01015.43
7.1.200.0100.00515.91
7.1.190.0060.00615.74
7.1.180.0100.00015.68
7.1.170.0100.00015.65
7.1.160.0000.01215.95
7.1.150.0070.00415.73
7.1.140.0040.00615.83
7.1.130.0000.01115.42
7.1.120.0030.00715.58
7.1.110.0100.00715.96
7.1.100.0060.00915.87
7.1.90.0100.00315.67
7.1.80.0030.00915.82
7.1.70.0070.00316.43
7.1.60.0070.00516.31
7.1.50.0020.01216.49
7.1.40.0040.00815.72
7.1.30.0070.00715.43
7.1.20.0140.00015.63
7.1.10.0060.00915.75
7.1.00.0030.04219.21
7.0.330.0070.00415.42
7.0.320.0000.00815.23
7.0.310.0040.00715.25
7.0.300.0060.00615.25
7.0.290.0040.00415.39
7.0.280.0030.01115.46
7.0.270.0000.00815.33
7.0.260.0030.01015.20
7.0.250.0040.01115.18
7.0.240.0050.00515.38
7.0.230.0030.00515.47
7.0.220.0040.00415.22
7.0.210.0060.00615.16
7.0.200.0320.00714.85
7.0.190.0070.00315.38
7.0.180.0030.00615.35
7.0.170.0030.01015.54
7.0.160.0030.00715.00
7.0.150.0130.00315.48
7.0.140.0080.00815.49
7.0.130.0060.00615.45
7.0.120.0040.01115.40
7.0.110.0170.03517.80
7.0.100.0170.03317.90
7.0.90.0130.03617.97
7.0.80.0190.03017.71
7.0.70.0150.03217.84
7.0.60.0200.03717.92
7.0.50.0180.02817.77
7.0.40.0190.02816.86
7.0.30.0150.03216.76
7.0.20.0220.02316.87
7.0.10.0180.02816.91
7.0.00.0120.03516.85
5.6.400.0030.00714.53
5.6.390.0040.00714.56
5.6.380.0050.00514.38
5.6.370.0000.01314.55
5.6.360.0040.01114.26
5.6.350.0070.00314.56
5.6.340.0040.00714.03
5.6.330.0100.00314.24
5.6.320.0040.00914.31
5.6.310.0100.00014.34
5.6.300.0080.00314.09
5.6.290.0060.00714.09
5.6.280.0000.00914.56
5.6.270.0080.00314.28
5.6.260.0070.03017.73
5.6.250.0060.03317.71
5.6.240.0070.03017.62
5.6.230.0050.03217.58
5.6.220.0110.02917.52
5.6.210.0050.03317.37
5.6.200.0100.02717.71
5.6.190.0020.03617.76
5.6.180.0020.04317.64
5.6.170.0090.02717.59
5.6.160.0060.04117.81
5.6.150.0070.03317.58
5.6.140.0050.03317.64
5.6.130.0090.03317.70
5.6.120.0100.03217.62
5.6.110.0120.03817.70
5.6.100.0110.03517.47
5.6.90.0110.02617.60
5.6.80.0070.02717.34
5.6.70.0060.02817.27
5.6.60.0080.02817.42
5.6.50.0120.02417.29
5.6.40.0050.03517.35
5.6.30.0110.03217.37
5.6.20.0090.02817.47
5.6.10.0060.02917.17
5.6.00.0080.02917.21

preferences:
66.16 ms | 401 KiB | 5 Q