3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SourceTransformingLoader extends php_user_filter { /** * Php filter definition */ const PHP_FILTER_READ = 'php://filter/read='; /** * Default PHP filter name for registration */ const FILTER_IDENTIFIER = 'go.source.transforming.loader'; /** * String buffer * * @var string */ protected $data = ''; /** * Identifier of filter * * @var string */ protected static $filterId; /** * Register current loader as stream filter in PHP * * @param string $filterId Identifier for the filter * @throws \RuntimeException If registration was failed */ public static function register($filterId = self::FILTER_IDENTIFIER) { if (!empty(self::$filterId)) { throw new \RuntimeException('Stream filter already registered'); } $result = stream_filter_register($filterId, __CLASS__); if (!$result) { throw new \RuntimeException('Stream filter was not registered'); } self::$filterId = $filterId; } /** * {@inheritdoc} */ 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); $bucket = stream_bucket_new($this->stream, $this->data); stream_bucket_append($out, $bucket); return PSFS_PASS_ON; } return PSFS_FEED_ME; } } SourceTransformingLoader::register(); echo file_get_contents('php://filter/read=go.source.transforming.loader/resource=' . __FILE__);

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.0100.01018.55
8.3.50.0110.00721.20
8.3.40.0030.01319.18
8.3.30.0070.00720.34
8.3.20.0050.00320.30
8.3.10.0050.00321.95
8.3.00.0080.00022.57
8.2.180.0170.00716.75
8.2.170.0100.00722.96
8.2.160.0120.00322.11
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00420.79
8.2.110.0060.00322.30
8.2.100.0090.00317.91
8.2.90.0050.00319.42
8.2.80.0080.00019.40
8.2.70.0040.00417.75
8.2.60.0050.00317.93
8.2.50.0000.00818.07
8.2.40.0030.00619.88
8.2.30.0050.00219.52
8.2.20.0000.00717.71
8.2.10.0040.00417.70
8.2.00.0040.00417.84
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0100.00023.91
8.1.230.0080.00419.32
8.1.220.0040.00417.91
8.1.210.0000.00818.77
8.1.200.0030.00717.48
8.1.190.0050.00317.66
8.1.180.0030.00519.13
8.1.170.0000.00818.84
8.1.160.0060.00319.02
8.1.150.0040.00418.78
8.1.140.0040.00417.54
8.1.130.0000.00717.94
8.1.120.0060.00317.45
8.1.110.0000.00817.52
8.1.100.0000.00717.53
8.1.90.0040.00417.58
8.1.80.0040.00417.51
8.1.70.0030.00317.49
8.1.60.0040.00417.55
8.1.50.0000.00817.56
8.1.40.0040.00417.60
8.1.30.0050.00317.74
8.1.20.0090.00017.63
8.1.10.0080.00017.64
8.1.00.0000.00817.47
8.0.300.0000.00718.77
8.0.290.0040.00417.30
8.0.280.0030.00318.50
8.0.270.0040.00417.43
8.0.260.0030.00316.84
8.0.250.0030.00317.03
8.0.240.0060.00617.07
8.0.230.0000.00717.03
8.0.220.0040.00417.02
8.0.210.0030.00516.92
8.0.200.0060.00017.14
8.0.190.0070.00017.07
8.0.180.0030.00517.09
8.0.170.0030.00617.02
8.0.160.0030.00417.03
8.0.150.0000.00717.08
8.0.140.0040.00417.03
8.0.130.0000.00513.47
8.0.120.0070.00017.00
8.0.110.0040.00416.98
8.0.100.0020.00517.09
8.0.90.0050.00216.94
8.0.80.0080.00817.07
8.0.70.0040.00417.02
8.0.60.0000.00816.91
8.0.50.0040.00417.05
8.0.30.0100.01417.02
8.0.20.0090.00917.40
8.0.10.0030.00417.06
8.0.00.0120.00516.95
7.4.330.0060.00015.00
7.4.320.0030.00316.52
7.4.300.0070.00016.48
7.4.290.0000.00816.72
7.4.280.0030.00316.62
7.4.270.0060.00316.60
7.4.260.0000.00613.34
7.4.250.0000.00816.62
7.4.240.0000.00716.56
7.4.230.0030.00316.48
7.4.220.0130.00616.71
7.4.210.0050.01116.68
7.4.200.0000.00716.67
7.4.190.0040.00416.62
7.4.160.0030.01216.55
7.4.150.0120.01217.40
7.4.140.0100.00917.86
7.4.130.0060.01016.54
7.4.120.0070.01016.48
7.4.110.0070.01116.64
7.4.100.0070.01016.63
7.4.90.0070.01116.54
7.4.80.0100.01319.39
7.4.70.0080.00916.65
7.4.60.0150.00316.59
7.4.50.0030.00616.70
7.4.40.0060.00622.77
7.4.30.0060.01216.48
7.4.00.0050.01014.76
7.3.330.0030.00313.48
7.3.320.0030.00313.45
7.3.310.0070.00016.55
7.3.300.0030.00316.51
7.3.290.0060.00916.43
7.3.280.0090.00816.53
7.3.270.0120.00617.40
7.3.260.0110.01116.79
7.3.250.0080.01316.47
7.3.240.0040.01816.40
7.3.230.0130.00616.43
7.3.210.0110.00616.55
7.3.200.0100.01016.50
7.3.190.0160.00616.56
7.3.180.0140.00316.72
7.3.170.0100.00716.48
7.3.160.0130.00816.52
7.3.120.0110.00514.98
7.3.110.0090.00814.96
7.3.100.0120.00515.13
7.3.90.0070.00514.75
7.3.80.0040.01414.95
7.3.70.0020.01215.01
7.3.60.0050.00915.03
7.3.50.0090.00514.90
7.3.40.0050.01214.85
7.3.30.0000.01214.68
7.3.20.0090.00516.71
7.3.10.0050.00816.80
7.3.00.0050.00816.53
7.2.330.0090.00916.90
7.2.320.0160.00616.53
7.2.310.0080.00816.75
7.2.300.0070.01016.81
7.2.290.0080.00816.75
7.2.250.0090.01215.05
7.2.240.0030.01215.34
7.2.230.0100.00715.06
7.2.220.0080.00815.19
7.2.210.0090.00715.27
7.2.200.0040.00715.04
7.2.190.0080.00315.21
7.2.180.0040.00815.11
7.2.170.0030.01315.06
7.2.160.0050.00815.08
7.2.150.0090.00416.92
7.2.140.0060.00816.91
7.2.130.0030.01216.99
7.2.120.0080.00916.89
7.2.110.0080.00516.77
7.2.100.0090.00616.96
7.2.90.0100.00717.03
7.2.80.0030.01116.91
7.2.70.0060.00616.87
7.2.60.0050.00916.91
7.2.50.0030.01216.98
7.2.40.0100.00716.98
7.2.30.0080.00617.07
7.2.20.0060.00816.85
7.2.10.0090.00817.03
7.2.00.0010.01217.55
7.1.330.0060.01015.80
7.1.320.0030.01215.92
7.1.310.0070.00915.84
7.1.300.0070.00815.67
7.1.290.0040.01015.81
7.1.280.0070.01015.70
7.1.270.0050.00615.92
7.1.260.0030.00915.80
7.1.250.0080.00515.71
7.1.240.0070.00715.86
7.1.230.0100.00615.71
7.1.220.0100.00315.84
7.1.210.0110.00315.89
7.1.200.0080.00515.95
7.1.190.0030.00715.61
7.1.180.0000.00915.75
7.1.170.0000.01415.62
7.1.160.0080.00515.76
7.1.150.0090.00015.67
7.1.140.0130.00715.95
7.1.130.0100.00315.79
7.1.120.0000.01215.79
7.1.110.0130.00315.87
7.1.100.0040.00817.01
7.1.90.0070.00715.83
7.1.80.0030.00615.67
7.1.70.0070.00716.43
7.1.60.0070.01117.59
7.1.50.0070.01016.30
7.1.40.0040.01116.01
7.1.30.0000.01415.65
7.1.20.0090.00615.89
7.1.10.0100.00315.95
7.1.00.0040.02419.07
7.0.330.0060.00615.51
7.0.320.0040.00815.43
7.0.310.0150.00015.23
7.0.300.0070.00715.32
7.0.290.0030.01015.45
7.0.280.0100.00615.33
7.0.270.0000.00915.46
7.0.260.0030.01415.38
7.0.250.0030.00715.29
7.0.240.0070.00415.67
7.0.230.0060.00315.47
7.0.220.0040.01115.49
7.0.210.0040.01215.60
7.0.200.0040.00416.06
7.0.190.0040.00715.48
7.0.180.0060.00915.21
7.0.170.0080.00815.29
7.0.160.0060.00915.22
7.0.150.0030.00715.34
7.0.140.0070.03718.58
7.0.130.0040.01115.14
7.0.120.0040.01215.51
7.0.110.0040.00415.64
7.0.100.0050.02217.68
7.0.90.0050.02517.79
7.0.80.0090.03717.56
7.0.70.0070.02217.73
7.0.60.0030.02317.76
7.0.50.0030.02417.96
7.0.40.0070.02216.85
7.0.30.0030.02816.81
7.0.20.0020.02916.83
7.0.10.0060.02616.71
7.0.00.0030.02816.83
5.6.400.0090.00614.42
5.6.390.0070.01014.29
5.6.380.0030.00914.74
5.6.370.0000.01314.53
5.6.360.0060.00914.75
5.6.350.0000.01814.84
5.6.340.0100.00714.22
5.6.330.0060.00314.35
5.6.320.0000.01714.79
5.6.310.0060.00914.62
5.6.300.0000.01014.51
5.6.290.0000.01214.68
5.6.280.0080.03517.55
5.6.270.0040.01414.36
5.6.260.0030.00614.43
5.6.250.0050.02217.65
5.6.240.0060.02617.56
5.6.230.0060.02617.51
5.6.220.0070.02317.66
5.6.210.0060.02117.66
5.6.200.0130.02317.78
5.6.190.0070.02117.70
5.6.180.0080.02017.85
5.6.170.0080.02517.83
5.6.160.0060.02317.82
5.6.150.0110.02017.56
5.6.140.0040.02317.82
5.6.130.0070.02117.70
5.6.120.0100.02517.69
5.6.110.0030.03017.62
5.6.100.0130.01617.67
5.6.90.0040.02417.62
5.6.80.0050.03117.46
5.6.70.0030.02517.33
5.6.60.0070.02417.30
5.6.50.0090.03617.29
5.6.40.0070.02317.38
5.6.30.0050.03817.42
5.6.20.0080.04317.49
5.6.10.0050.03617.40
5.6.00.0120.03817.42
5.5.380.0110.01317.46
5.5.370.0050.02417.42
5.5.360.0100.02217.33
5.5.350.0070.02317.44
5.5.340.0050.02717.65
5.5.330.0100.01817.64
5.5.320.0040.02417.54
5.5.310.0080.02217.81
5.5.300.0040.02217.63
5.5.290.0090.02217.58
5.5.280.0040.02517.78
5.5.270.0080.02217.65
5.5.260.0050.02617.62
5.5.250.0000.02617.40
5.5.240.0080.01817.25
5.5.230.0050.02217.19
5.5.220.0080.04317.40
5.5.210.0080.02217.29
5.5.200.0020.02917.21
5.5.190.0020.03317.31
5.5.180.0100.03517.34
5.5.170.0000.01414.39
5.5.160.0120.04017.09
5.5.150.0030.03817.31
5.5.140.0030.03017.23
5.5.130.0110.02517.34
5.5.120.0190.02817.20
5.5.110.0020.04717.36
5.5.100.0070.04117.19
5.5.90.0070.02317.19
5.5.80.0070.02417.32
5.5.70.0070.04217.30
5.5.60.0080.02517.21
5.5.50.0080.03317.34
5.5.40.0050.04517.21
5.5.30.0200.02517.24
5.5.20.0080.03717.04
5.5.10.0090.03317.34
5.5.00.0070.03917.21
5.4.450.0040.02216.07
5.4.440.0030.02516.08
5.4.430.0030.02516.12
5.4.420.0050.02016.03
5.4.410.0020.02516.02
5.4.400.0040.02115.89
5.4.390.0050.02215.79
5.4.380.0070.04515.78
5.4.370.0050.04415.78
5.4.360.0020.03615.77
5.4.350.0060.02315.79
5.4.340.0050.02715.79
5.4.330.0030.00612.68
5.4.320.0070.03515.87
5.4.310.0030.03815.77
5.4.300.0100.03615.90
5.4.290.0050.02315.90
5.4.280.0020.03815.92
5.4.270.0050.04315.96
5.4.260.0050.02515.93
5.4.250.0050.03515.81
5.4.240.0020.02915.86
5.4.230.0050.04015.76
5.4.220.0050.03415.85
5.4.210.0050.04115.79
5.4.200.0050.04115.95
5.4.190.0060.03315.77
5.4.180.0080.03015.85
5.4.170.0080.03815.86
5.4.160.0050.03315.76
5.4.150.0070.04015.85
5.4.140.0010.04114.58
5.4.130.0080.03314.57
5.4.120.0070.04014.57
5.4.110.0030.04014.58
5.4.100.0030.03714.62
5.4.90.0050.04014.53
5.4.80.0020.02214.58
5.4.70.0050.03714.60
5.4.60.0100.02214.51
5.4.50.0070.03514.58
5.4.40.0080.03514.55
5.4.30.0030.03514.56
5.4.20.0070.03714.51
5.4.10.0160.02114.58
5.4.00.0050.04014.27
5.3.290.0050.03613.70
5.3.280.0080.04013.68
5.3.270.0070.03513.66
5.3.260.0060.03713.65
5.3.250.0000.03113.66
5.3.240.0070.02813.62
5.3.230.0030.04013.64
5.3.220.0040.04413.67
5.3.210.0040.02913.63
5.3.200.0070.02013.62
5.3.190.0050.04013.63
5.3.180.0070.03313.64
5.3.170.0070.02113.67
5.3.160.0020.04013.66
5.3.150.0030.02713.63
5.3.140.0080.03813.69
5.3.130.0120.03613.64
5.3.120.0030.03013.64
5.3.110.0050.04313.63
5.3.100.0040.04313.45
5.3.90.0030.04013.36
5.3.80.0080.03713.37
5.3.70.0070.02313.37
5.3.60.0070.03613.43
5.3.50.0030.04413.38
5.3.40.0070.03713.33
5.3.30.0070.03713.30
5.3.20.0000.04513.22
5.3.10.0030.04213.22
5.3.00.0080.02513.11
5.2.170.0000.05712.05
5.2.160.0070.05712.05
5.2.150.0100.05312.05
5.2.140.0000.07012.05
5.2.130.0030.04012.05
5.2.120.0070.06012.05
5.2.110.0100.05012.05
5.2.100.0030.04012.05
5.2.90.0030.06012.05
5.2.80.0070.06712.05
5.2.70.0030.06712.05
5.2.60.0000.07012.05
5.2.50.0100.06012.05
5.2.40.0070.05312.05
5.2.30.0100.05712.05
5.2.20.0030.03312.05
5.2.10.0100.04012.05
5.2.00.0100.05312.05
5.1.60.0030.03312.05
5.1.50.0030.05012.05
5.1.40.0000.05712.05
5.1.30.0030.05312.05
5.1.20.8731.623779.50
5.1.11.0431.497909.48
5.1.00.9631.517937.09
5.0.50.8931.287678.16
5.0.41.0301.490699.85
5.0.31.0501.420699.64
5.0.20.9601.547662.55
5.0.10.9931.547877.73
5.0.01.0971.420724.96
4.4.90.0000.04012.05
4.4.80.0030.03312.05
4.4.70.0070.03012.05
4.4.60.0000.03312.05
4.4.50.0030.03712.05
4.4.40.0000.05312.05
4.4.30.0000.03712.05
4.4.20.0000.03712.05
4.4.10.0000.03712.05
4.4.00.0070.04012.05
4.3.110.0000.03712.05
4.3.100.0100.02712.05
4.3.90.0070.03012.05
4.3.80.0030.05712.05
4.3.70.0070.02712.05
4.3.60.0030.02712.05
4.3.50.0000.03712.05
4.3.40.0000.05312.05
4.3.30.0000.01712.05
4.3.20.0000.03712.05
4.3.10.0030.03312.05
4.3.00.0030.03312.05

preferences:
62.7 ms | 401 KiB | 5 Q