3v4l.org

run code in 300+ PHP versions simultaneously
<?php class sf extends php_user_filter { function onCreate() { //var_dump($this); } function filter($in, $out, &$consumed, $closing) { //var_dump(func_get_args()); if(!$closing) { $bucket = stream_bucket_make_writeable($in); $bucket->data = 'A'.$bucket->data.'B'; $consumed += $bucket->datalen; stream_bucket_prepend($out, $bucket); return PSFS_PASS_ON; } else { return PSFS_FEED_ME; } } } $r = fopen('php://memory', 'wb+'); stream_filter_register('sf', 'sf' ); stream_filter_append($r, 'sf', STREAM_FILTER_READ); fwrite($r, 'lol'); rewind($r); var_dump(fread($r, 1)); echo fread($r, 2);

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.0130.00318.86
8.3.30.0040.01118.97
8.3.20.0040.00421.74
8.3.10.0040.00423.66
8.3.00.0050.00319.98
8.2.170.0110.00422.96
8.2.160.0040.01221.24
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00720.52
8.2.120.0080.00026.35
8.2.110.0060.00319.15
8.2.100.0060.00617.97
8.2.90.0000.00819.32
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0000.00818.10
8.2.40.0000.00820.47
8.2.30.0050.00321.10
8.2.20.0040.00418.14
8.2.10.0040.00418.14
8.2.00.0000.00718.07
8.1.270.0040.00423.85
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0040.01823.92
8.1.230.0000.01119.73
8.1.220.0000.00817.74
8.1.210.0030.00918.77
8.1.200.0000.00917.35
8.1.190.0000.00817.13
8.1.180.0050.00318.10
8.1.170.0060.00318.64
8.1.160.0040.00418.81
8.1.150.0040.00420.26
8.1.140.0040.00419.54
8.1.130.0050.00220.68
8.1.120.0070.00017.44
8.1.110.0050.00317.40
8.1.100.0050.00317.47
8.1.90.0040.00417.36
8.1.80.0030.00617.41
8.1.70.0000.00717.51
8.1.60.0030.01017.63
8.1.50.0030.01017.44
8.1.40.0040.00417.56
8.1.30.0030.00517.57
8.1.20.0030.00517.70
8.1.10.0050.00317.50
8.1.00.0040.00417.46
8.0.300.0020.00518.77
8.0.290.0040.00416.88
8.0.280.0030.00318.55
8.0.270.0070.00017.34
8.0.260.0030.00316.92
8.0.250.0040.00416.91
8.0.240.0080.00017.07
8.0.230.0000.00716.91
8.0.220.0040.00416.93
8.0.210.0000.00716.93
8.0.200.0000.00716.98
8.0.190.0030.00616.93
8.0.180.0080.00017.01
8.0.170.0040.00416.99
8.0.160.0040.00416.98
8.0.150.0000.00816.98
8.0.140.0000.00816.79
8.0.130.0030.00313.43
8.0.120.0030.00616.97
8.0.110.0000.00716.79
8.0.100.0040.00417.02
8.0.90.0000.00716.98
8.0.80.0130.00616.96
8.0.70.0030.00516.88
8.0.60.0040.00416.86
8.0.50.0000.00816.79
8.0.30.0110.00917.10
8.0.20.0100.01017.40
8.0.10.0040.00417.09
8.0.00.0120.00916.74
7.4.330.0000.00515.55
7.4.320.0000.00616.54
7.4.300.0000.00616.64
7.4.290.0030.00616.50
7.4.280.0070.00016.52
7.4.270.0030.00316.60
7.4.260.0030.00316.58
7.4.250.0000.00816.59
7.4.240.0030.00316.66
7.4.230.0090.00016.62
7.4.220.0090.00916.64
7.4.210.0030.01316.52
7.4.200.0020.00516.43
7.4.160.0120.00416.56
7.4.150.0180.00417.40
7.4.140.0070.01117.86
7.4.130.0120.00916.68
7.4.120.0090.00816.58
7.4.110.0080.00816.49
7.4.100.0060.01216.70
7.4.90.0070.01016.48
7.4.80.0180.00719.39
7.4.70.0180.00016.48
7.4.60.0030.01316.43
7.4.50.0030.01216.67
7.4.40.0060.01016.40
7.4.30.0090.01316.47
7.4.00.0050.01215.07
7.3.330.0000.00513.43
7.3.320.0030.00313.31
7.3.310.0040.00416.35
7.3.300.0000.00716.50
7.3.290.0080.00716.47
7.3.280.0110.00516.43
7.3.270.0110.00717.40
7.3.260.0080.01016.38
7.3.250.0100.00816.58
7.3.240.0100.00716.46
7.3.230.0040.01316.62
7.3.210.0100.00716.34
7.3.200.0110.01116.55
7.3.190.0040.01116.28
7.3.180.0030.01416.48
7.3.170.0110.01116.52
7.3.160.0080.00816.57
7.3.120.0100.00614.83
7.3.110.0070.01014.73
7.3.100.0110.00315.04
7.3.90.0060.00615.12
7.3.80.0120.00614.92
7.3.70.0030.00915.05
7.3.60.0090.00314.88
7.3.50.0000.01314.86
7.3.40.0060.00914.74
7.3.30.0040.00814.75
7.3.20.0000.01516.69
7.3.10.0120.00316.66
7.3.00.0030.00716.83
7.2.330.0080.01616.87
7.2.320.0070.01916.73
7.2.310.0070.01416.79
7.2.300.0110.00616.71
7.2.290.0100.00616.76
7.2.250.0100.01015.09
7.2.240.0060.01215.24
7.2.230.0090.00615.15
7.2.220.0070.00714.73
7.2.210.0110.00315.36
7.2.200.0090.00615.13
7.2.190.0000.01815.16
7.2.180.0070.00714.90
7.2.170.0030.01315.29
7.2.60.0060.00817.04
7.2.50.0100.00316.98
7.1.330.0030.01015.83
7.1.320.0030.01015.82
7.1.310.0030.00715.88
7.1.300.0070.01015.65
7.1.290.0060.00615.70
7.1.280.0070.00716.00
7.1.270.0110.00315.99
7.1.260.0100.00715.80
7.1.200.0090.00315.46
7.1.70.0030.00316.89
7.1.60.1700.01733.32
7.1.50.0200.02032.98
7.1.40.0300.01032.54
7.1.30.0270.02332.60
7.1.20.2670.01332.80
7.1.10.0100.01314.79
7.1.00.2170.01314.79
7.0.200.1970.01714.86
7.0.190.2230.01014.53
7.0.180.0200.01314.32
7.0.170.0400.01014.43
7.0.160.0230.01314.35
7.0.150.0070.01314.36
7.0.140.0030.01714.22
7.0.130.0100.01714.66
7.0.120.1500.01014.55
7.0.110.2070.01314.38
7.0.100.0870.01714.64
7.0.90.1600.01014.57
7.0.80.0070.01714.60
7.0.70.0130.01014.60
7.0.60.0100.01014.24
7.0.50.0200.00314.43
7.0.40.0430.02014.50
7.0.30.0100.01314.59
7.0.20.1630.01014.72
7.0.10.0130.01714.58
7.0.00.2500.01314.71

preferences:
54.21 ms | 400 KiB | 5 Q