3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'bug'; // Should be transformed by filter on second include if (!class_exists(SampleFilter::class)) { class SampleFilter extends php_user_filter { private $data = ''; public function filter($in, $out, &$consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { $this->data .= $bucket->data; } if ($closing || feof($this->stream)) { $consumed = strlen($this->data); $this->data = str_replace('bug', 'feature', $this->data); $bucket = stream_bucket_new($this->stream, $this->data); stream_bucket_append($out, $bucket); return PSFS_PASS_ON; } return PSFS_FEED_ME; } } stream_filter_register('sample.filter', SampleFilter::class); $uri = 'php://filter/read=sample.filter/resource='. __FILE__; $content = file_get_contents($uri); echo '<pre>', htmlentities($content), '</pre>'; // Looks good include $uri; // We expect one more "feature" output at line 3 }

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.60.0070.00718.43
8.3.50.0100.00716.39
8.3.40.0120.00318.83
8.3.30.0090.00618.97
8.3.20.0080.00021.07
8.3.10.0080.00021.87
8.3.00.0080.00023.65
8.2.180.0160.00018.14
8.2.170.0120.00322.96
8.2.160.0100.00720.29
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0080.00026.16
8.2.110.0090.00022.07
8.2.100.0000.01117.80
8.2.90.0050.00320.56
8.2.80.0080.00017.97
8.2.70.0100.00018.04
8.2.60.0080.00018.34
8.2.50.0080.00018.10
8.2.40.0040.00419.52
8.2.30.0000.00819.25
8.2.20.0000.00718.13
8.2.10.0030.00619.32
8.2.00.0070.00319.50
8.1.280.0120.00425.92
8.1.270.0050.00320.95
8.1.260.0060.00326.35
8.1.250.0100.00728.09
8.1.240.0030.00622.33
8.1.230.0110.00020.99
8.1.220.0060.00317.88
8.1.210.0050.00319.05
8.1.200.0030.00717.47
8.1.190.0050.00317.35
8.1.180.0030.00618.10
8.1.170.0040.00418.72
8.1.160.0050.00318.86
8.1.150.0050.00318.95
8.1.140.0040.00420.99
8.1.130.0000.00717.47
8.1.120.0000.01017.53
8.1.110.0050.00217.45
8.1.100.0000.00717.46
8.1.90.0040.00417.57
8.1.80.0040.00417.38
8.1.70.0000.00717.57
8.1.60.0030.00617.73
8.1.50.0040.00417.69
8.1.40.0050.00317.56
8.1.30.0040.00417.76
8.1.20.0040.00417.81
8.1.10.0030.00617.58
8.1.00.0050.00317.61
8.0.300.0050.00320.28
8.0.290.0040.00416.88
8.0.280.0050.00218.58
8.0.270.0030.00317.38
8.0.260.0030.00316.86
8.0.250.0100.00017.13
8.0.240.0030.00317.06
8.0.230.0040.00416.98
8.0.220.0030.00316.95
8.0.210.0020.00517.00
8.0.200.0080.00017.08
8.0.190.0000.00816.96
8.0.180.0040.00416.99
8.0.170.0030.00717.05
8.0.160.0050.00216.91
8.0.150.0000.00716.96
8.0.140.0040.00416.99
8.0.130.0030.00313.40
8.0.120.0060.00317.00
8.0.110.0070.00016.86
8.0.100.0000.00717.04
8.0.90.0040.00417.03
8.0.80.0060.00916.98
8.0.70.0000.00917.04
8.0.60.0080.00017.01
8.0.50.0000.00817.03
8.0.30.0100.01017.09
8.0.20.0060.01417.05
8.0.10.0020.00516.95
8.0.00.0090.01216.85
7.4.330.0050.00015.55
7.4.320.0000.00616.67
7.4.300.0030.00316.65
7.4.290.0000.00816.67
7.4.280.0120.00016.69
7.4.270.0000.00716.66
7.4.260.0000.00713.35
7.4.250.0050.00216.63
7.4.240.0040.00416.64
7.4.230.0000.00716.76
7.4.220.0020.00516.64
7.4.210.0060.00916.67
7.4.200.0050.00316.75
7.4.140.0130.00317.86
7.4.130.0110.01116.52
7.4.120.0110.00716.58
7.4.110.0140.00616.49
7.4.100.0060.01016.54
7.4.90.0120.00616.57
7.4.80.0160.00419.39
7.4.70.0150.00616.61
7.4.60.0120.00416.43
7.4.50.0060.00916.40
7.4.40.0060.01216.71
7.4.00.0080.00815.01
7.3.330.0070.00016.48
7.3.320.0050.00013.51
7.3.310.0060.00316.49
7.3.300.0030.00316.50
7.3.290.0050.01016.53
7.3.280.0080.01116.46
7.3.260.0090.00916.55
7.3.240.0100.00816.50
7.3.230.0110.00716.52
7.3.210.0100.00716.50
7.3.200.0030.01316.62
7.3.190.0120.00916.58
7.3.180.0100.00716.46
7.3.170.0120.00816.52
7.3.160.0000.02216.49
7.3.120.0050.01215.02
7.3.110.0080.00914.97
7.3.100.0090.00714.91
7.3.90.0090.00614.86
7.3.80.0050.00914.91
7.3.70.0080.00814.79
7.3.60.0110.00314.90
7.3.50.0060.00914.80
7.3.40.0070.00714.83
7.3.30.0050.01114.92
7.3.20.0110.00415.33
7.3.10.0080.00615.39
7.3.00.0190.00815.30
7.2.330.0000.01816.88
7.2.320.0090.00916.59
7.2.310.0130.00716.90
7.2.300.0090.00916.74
7.2.290.0060.01116.69
7.2.250.0100.00615.14
7.2.240.0110.00515.25
7.2.230.0050.00915.14
7.2.220.0110.00715.00
7.2.210.0060.01015.26
7.2.200.0080.00815.04
7.2.190.0050.00914.93
7.2.180.0080.00614.87
7.2.170.0080.00514.99
7.2.160.0040.01114.93
7.2.150.0300.00715.62
7.2.140.0070.00915.54
7.2.130.0090.00815.49
7.2.120.0090.00815.51
7.2.110.0100.00715.50
7.2.100.0110.00615.53
7.2.90.0100.00615.53
7.2.80.0080.00715.69
7.2.70.0110.00715.57
7.2.60.0070.01215.61
7.2.50.0080.00915.50
7.2.40.0110.00915.56
7.2.30.0130.00815.60
7.2.20.0130.00715.58
7.2.10.0070.01115.57
7.2.00.0100.00715.51
7.1.330.0120.00814.01
7.1.320.0180.00514.01
7.1.310.0090.00713.88
7.1.300.0240.00913.89
7.1.290.0070.00913.98
7.1.280.0130.00813.97
7.1.270.0090.00814.05
7.1.260.0090.00813.91
7.1.250.0140.00714.09
7.1.240.0190.00513.97
7.1.230.0130.00513.69
7.1.220.0130.01014.11
7.1.210.0160.00813.77
7.1.200.0090.01013.86
7.1.190.0160.00313.79
7.1.180.0120.00814.00
7.1.170.0070.01114.03
7.1.160.0050.01113.66
7.1.150.0100.01313.73
7.1.140.0140.00413.73
7.1.130.0070.01113.73
7.1.120.0150.00413.52
7.1.110.0130.00613.80
7.1.100.0090.01213.99
7.1.90.0050.01013.68
7.1.80.0140.00713.82
7.1.70.0170.00713.90
7.1.60.0150.01114.14
7.1.50.0170.00513.84
7.1.40.0080.01413.97
7.1.30.0240.00313.95
7.1.20.0080.01113.91
7.1.10.0200.00314.09
7.1.00.0090.01213.86

preferences:
74.03 ms | 400 KiB | 5 Q