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.0070.01416.75
8.3.50.0170.00222.04
8.3.40.0120.00318.93
8.3.30.0040.01119.13
8.3.20.0070.00020.20
8.3.10.0030.00523.53
8.3.00.0050.00320.94
8.2.180.0260.00716.38
8.2.170.0100.01022.96
8.2.160.0130.00720.64
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00419.48
8.2.110.0060.00322.26
8.2.100.0030.00918.15
8.2.90.0080.00019.48
8.2.80.0080.00017.97
8.2.70.0040.00417.50
8.2.60.0050.00518.04
8.2.50.0040.00418.07
8.2.40.0030.00718.34
8.2.30.0000.01118.37
8.2.20.0000.00817.82
8.2.10.0050.00218.11
8.2.00.0000.00819.45
8.1.280.0140.00725.92
8.1.270.0080.00023.71
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00323.83
8.1.230.0070.00319.21
8.1.220.0000.00817.88
8.1.210.0000.00818.77
8.1.200.0090.00017.48
8.1.190.0030.00617.48
8.1.180.0040.00418.10
8.1.170.0040.00418.57
8.1.160.0030.00622.09
8.1.150.0060.00318.64
8.1.140.0040.00417.44
8.1.130.0040.00417.91
8.1.120.0000.00817.57
8.1.110.0030.00617.57
8.1.100.0080.00017.52
8.1.90.0040.00417.50
8.1.80.0000.00817.57
8.1.70.0070.00017.47
8.1.60.0060.00317.59
8.1.50.0030.00517.48
8.1.40.0040.00417.52
8.1.30.0060.00317.68
8.1.20.0000.00917.71
8.1.10.0000.00717.55
8.1.00.0040.00417.45
8.0.300.0080.00018.77
8.0.290.0030.00516.88
8.0.280.0000.00718.48
8.0.270.0030.00317.46
8.0.260.0040.00417.32
8.0.250.0030.00317.01
8.0.240.0040.00417.03
8.0.230.0000.00717.02
8.0.220.0000.00717.08
8.0.210.0030.00316.89
8.0.200.0040.00417.09
8.0.190.0050.00317.09
8.0.180.0080.00416.78
8.0.170.0050.00317.04
8.0.160.0070.00017.05
8.0.150.0070.00016.91
8.0.140.0040.00416.98
8.0.130.0000.00513.46
8.0.120.0080.00017.04
8.0.110.0000.00717.05
8.0.100.0020.00517.06
8.0.90.0030.00616.98
8.0.80.0120.00917.00
8.0.70.0000.00816.86
8.0.60.0030.00316.93
8.0.50.0040.00416.98
8.0.30.0140.00417.36
8.0.20.0090.00917.40
8.0.10.0040.00416.96
8.0.00.0080.01016.86
7.4.330.0000.00615.09
7.4.320.0000.00616.68
7.4.300.0030.00316.67
7.4.290.0080.00016.50
7.4.280.0040.00416.67
7.4.270.0030.00316.68
7.4.260.0080.00016.60
7.4.250.0040.00416.62
7.4.240.0000.00716.62
7.4.230.0000.00816.75
7.4.220.0090.00916.54
7.4.210.0150.00016.63
7.4.200.0000.00716.79
7.4.160.0100.00716.60
7.4.150.0140.00717.40
7.4.140.0140.00717.86
7.4.130.0100.00816.64
7.4.120.0070.01016.54
7.4.110.0110.00816.76
7.4.100.0110.01116.58
7.4.90.0100.00716.66
7.4.80.0130.00719.39
7.4.70.0080.00816.63
7.4.60.0040.01216.57
7.4.50.0040.00016.48
7.4.40.0080.00916.66
7.4.30.0030.01316.55
7.4.00.0050.01114.99
7.3.330.0000.00513.50
7.3.320.0000.00613.25
7.3.310.0030.00316.61
7.3.300.0030.00316.45
7.3.290.0090.01016.39
7.3.280.0120.00616.50
7.3.270.0190.00617.40
7.3.260.0090.00916.47
7.3.250.0110.00616.53
7.3.240.0110.00816.63
7.3.230.0120.00416.40
7.3.210.0130.00516.41
7.3.200.0030.01319.39
7.3.190.0120.01016.52
7.3.180.0070.00816.44
7.3.170.0080.00916.48
7.3.160.0170.00616.50
7.3.120.0080.00815.03
7.3.110.0060.01215.06
7.3.100.0090.00315.14
7.3.90.0060.00615.12
7.3.80.0060.00614.70
7.3.70.0100.00314.93
7.3.60.0070.00714.99
7.3.50.0030.01014.97
7.3.40.0070.00414.95
7.3.30.0070.00714.99
7.3.20.0150.00016.71
7.3.10.0100.00316.70
7.3.00.0100.00616.66
7.2.330.0070.01016.78
7.2.320.0100.00716.52
7.2.310.0100.00616.82
7.2.300.0070.01016.38
7.2.290.0140.00316.82
7.2.250.0030.00915.14
7.2.240.0060.01315.08
7.2.230.0030.01415.19
7.2.220.0060.00615.32
7.2.210.0060.01314.83
7.2.200.0030.00915.10
7.2.190.0000.01315.23
7.2.180.0120.00314.88
7.2.170.0140.00015.19
7.2.00.0000.01519.13
7.1.330.0090.00615.74
7.1.320.0040.00416.01
7.1.310.0030.00815.88
7.1.300.0070.01015.80
7.1.290.0060.01015.55
7.1.280.0070.00715.81
7.1.270.0030.00615.97
7.1.260.0040.01115.97
7.1.100.0060.00618.04
7.1.70.0000.00917.19
7.1.60.0060.00917.29
7.1.50.0110.00716.90
7.1.40.0070.01016.60
7.1.30.0060.00916.45
7.1.20.0060.00916.81
7.1.10.0000.01216.67
7.1.00.0080.00416.87
7.0.200.0070.00416.70
7.0.190.0080.00416.68
7.0.180.0090.00416.15
7.0.170.0040.00816.55
7.0.160.0060.00616.27
7.0.150.0110.00016.12
7.0.140.0040.00816.44
7.0.130.0040.00816.62
7.0.120.0040.01216.55
7.0.110.0050.00716.46
7.0.100.0150.00016.25
7.0.90.0080.00416.34
7.0.80.0050.00516.45
7.0.70.0020.00716.39
7.0.60.0080.00316.14
7.0.50.0090.00916.56
7.0.40.0060.00615.36
7.0.30.0030.00915.36
7.0.20.0080.00415.36
7.0.10.0070.00715.36
7.0.00.0060.00915.36
5.6.300.0060.04720.79
5.6.290.0100.03620.93
5.6.280.0110.04420.88
5.6.270.0030.04521.06
5.6.260.0040.04820.91
5.6.250.0110.04621.07
5.6.240.0040.04320.98
5.6.230.0030.04520.83
5.6.220.0030.04620.92
5.6.210.0030.04420.81
5.6.200.0030.04820.87
5.6.190.0110.04320.87
5.6.180.0090.04720.74
5.6.170.0060.05620.82
5.6.160.0070.05421.02
5.6.150.0060.04521.03
5.6.140.0140.07820.93
5.6.130.0140.07620.74
5.6.120.0030.04520.96
5.6.110.0070.06420.82
5.6.100.0130.07921.03
5.6.90.0030.04420.81
5.6.80.0100.04620.11
5.6.70.0100.04020.32
5.6.60.0100.04420.34
5.6.50.0030.04020.32
5.6.40.0030.04220.09
5.6.30.0070.03920.05
5.6.20.0070.05820.38
5.6.10.0030.04820.19
5.6.00.0040.03920.06
5.5.380.0000.04217.63
5.5.370.0070.03817.53
5.5.360.0070.04517.57
5.5.350.0070.04017.62
5.5.340.0130.05317.71
5.5.330.0000.05018.00
5.5.320.0030.06518.07
5.5.310.0070.04018.05
5.5.300.0030.07718.07
5.5.290.0070.04717.70
5.5.280.0030.08818.00
5.5.270.0000.04618.03
5.5.260.0070.04418.07
5.5.250.0040.04917.88
5.5.240.0030.04117.51
5.5.230.0030.03817.40
5.5.220.0030.04217.45
5.5.210.0210.03117.45
5.5.200.0000.04117.06
5.5.190.0000.04117.34
5.5.180.0030.05217.43
5.5.160.0030.04017.48
5.5.150.0030.03817.09
5.5.140.0000.04117.43
5.5.130.0000.05317.35
5.5.120.0030.03817.45
5.5.110.0130.03917.34
5.5.100.0000.04117.11
5.5.90.0100.07416.96
5.5.80.0130.04816.95
5.5.70.0000.04417.25
5.5.60.0030.04317.28
5.5.50.0070.03816.99
5.5.40.0070.03617.28
5.5.30.0090.03117.26
5.5.20.0060.06317.33
5.5.10.0030.04017.07
5.5.00.0000.04416.93
5.4.450.0030.05219.38
5.4.440.0070.04119.31
5.4.430.0030.04019.29
5.4.420.0030.04419.39
5.4.410.0070.03919.43
5.4.400.0030.04519.17
5.4.390.0000.04618.91
5.4.380.0040.04019.04
5.4.370.0040.03919.16
5.4.360.0030.04219.20
5.4.350.0100.03318.94
5.4.340.0000.04318.89
5.4.320.0040.03919.08
5.4.310.0070.03819.23
5.4.300.0070.03718.98
5.4.290.0070.06219.23
5.4.280.0060.03519.07
5.4.270.0110.03419.04
5.4.260.0030.06118.97
5.4.250.0060.06519.15
5.4.240.0090.03319.22
5.4.230.0000.04619.06
5.4.220.0070.03619.19
5.4.210.0130.03119.09
5.4.200.0030.04219.20
5.4.190.0030.05019.19
5.4.180.0030.03619.06
5.4.170.0030.04119.12
5.4.160.0060.03618.95
5.4.150.0030.04018.96
5.4.140.0030.03816.63
5.4.130.0070.03416.45
5.4.120.0000.03616.49
5.4.110.0070.04416.76
5.4.100.0030.03416.46
5.4.90.0000.04816.78
5.4.80.0070.07216.67
5.4.70.0000.03916.79
5.4.60.0030.03416.46
5.4.50.0030.03616.75
5.4.40.0040.03516.43
5.4.30.0060.03416.60
5.4.20.0000.03716.45
5.4.10.0030.03916.67
5.4.00.0070.03115.88
5.3.290.0040.05015.37
5.3.280.0090.03415.37
5.3.270.0030.03815.37
5.3.260.0000.04415.37
5.3.250.0040.03615.37
5.3.240.0060.03715.37
5.3.230.0030.03515.37
5.3.220.0030.03515.37
5.3.210.0070.04115.37
5.3.200.0000.04015.37
5.3.190.0000.05515.37
5.3.180.0000.04015.37
5.3.170.0030.03815.37
5.3.160.0000.04415.37
5.3.150.0070.03815.37
5.3.140.0030.03615.37
5.3.130.0030.04015.37
5.3.120.0030.03715.37
5.3.110.0030.03715.37
5.3.100.0070.03915.37
5.3.90.0060.03415.37
5.3.80.0000.03815.37
5.3.70.0000.03715.37
5.3.60.0100.04115.37
5.3.50.0030.03715.37
5.3.40.0030.03515.37
5.3.30.0030.03515.37
5.3.20.0070.03015.37
5.3.10.0000.03915.37
5.3.00.0030.03915.37
5.2.170.0000.03615.37
5.2.160.0030.02715.37
5.2.150.0000.03315.37
5.2.140.0070.02615.37
5.2.130.0070.02415.37
5.2.120.0070.02415.37
5.2.110.0060.02515.37
5.2.100.0090.02115.37
5.2.90.0040.02915.37
5.2.80.0000.03615.37
5.2.70.0030.02815.37
5.2.60.0030.03115.37
5.2.50.0060.02915.37
5.2.40.0000.03015.37
5.2.30.0030.04015.37
5.2.20.0000.03415.37
5.2.10.0030.03015.37
5.2.00.0030.03015.37
5.1.60.0030.02315.37
5.1.50.0130.03215.37
5.1.40.0000.03315.37
5.1.30.0000.03015.37
5.1.20.1300.296264.12
5.1.10.1170.228263.72
5.1.00.1100.250263.62
5.0.50.2230.220262.98
5.0.40.1100.266262.77
5.0.30.2060.286262.70
5.0.20.1100.241262.38
5.0.10.1240.291262.46
5.0.00.1130.256262.60
4.4.90.0000.01815.37
4.4.80.0000.01615.37
4.4.70.0000.01715.37
4.4.60.0030.01715.37
4.4.50.0000.01815.37
4.4.40.0040.02215.37
4.4.30.0000.01915.37
4.4.20.0000.02015.37
4.4.10.0070.01515.37
4.4.00.0100.05515.37
4.3.110.0000.02415.37
4.3.100.0000.01615.37
4.3.90.0070.03415.37
4.3.80.0030.02915.37
4.3.70.0030.02115.37
4.3.60.0000.01615.37
4.3.50.0000.01815.37
4.3.40.0000.02815.37
4.3.30.0070.01515.37
4.3.20.0000.01915.37
4.3.10.0000.01715.37
4.3.00.0000.03115.37

preferences:
43.09 ms | 401 KiB | 5 Q