3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class Test { private function parseDocComment(string $comment): array { $result = []; foreach (\preg_split('#[\r\n]+#', $comment, -1, \PREG_SPLIT_NO_EMPTY) as $line) { if (\preg_match('#\s\*\s*@([a-z0-9\-_])\s*(.*)#i', $line, $match)) { $result[$match[1]] = $match[2] ?? ''; } } var_dump($result); return $result; } public function __call(string $name, array $arguments) { $objectReflection = new \ReflectionObject($this); if (!$objectReflection->hasMethod($name)) { throw new Exception('Invalid route target: ' . self::class . '::' . $name); } $methodReflection = $objectReflection->getMethod($name); if (false === $comment = $methodReflection->getDocComment()) { throw new Exception('Invalid route target: ' . self::class . '::' . $name); } $comment = $this->parseDocComment($comment); if (!isset($comment['json'])) { throw new Exception('Invalid route target: ' . self::class . '::' . $name); } return $this->{$name}(...$arguments); } /** * @json */ private function method() { echo ":-("; } } (new Test)->method();

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.0090.00918.56
8.3.50.0110.00716.48
8.3.40.0120.00319.00
8.3.30.0090.00619.18
8.3.20.0080.00019.24
8.3.10.0040.00421.90
8.3.00.0090.00018.19
8.2.180.0130.01018.89
8.2.170.0040.01822.96
8.2.160.0140.00420.45
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00720.58
8.2.120.0040.00426.35
8.2.110.0060.00322.21
8.2.100.0000.01218.09
8.2.90.0040.00418.00
8.2.80.0040.00417.97
8.2.70.0000.01018.05
8.2.60.0040.00418.16
8.2.50.0060.00318.10
8.2.40.0030.00519.30
8.2.30.0000.00820.76
8.2.20.0000.00718.22
8.2.10.0000.00718.23
8.2.00.0090.00018.07
8.1.280.0160.00625.92
8.1.270.0090.00022.13
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.91
8.1.230.0060.00619.17
8.1.220.0000.00817.79
8.1.210.0060.00318.77
8.1.200.0060.00317.48
8.1.190.0070.00317.35
8.1.180.0060.00318.10
8.1.170.0060.00318.71
8.1.160.0020.00518.99
8.1.150.0040.00418.97
8.1.140.0040.00819.55
8.1.130.0000.00818.89
8.1.120.0030.00617.70
8.1.110.0000.00817.63
8.1.100.0040.00417.49
8.1.90.0000.00817.65
8.1.80.0000.00817.64
8.1.70.0070.00017.67
8.1.60.0040.00417.71
8.1.50.0040.00417.61
8.1.40.0030.00617.73
8.1.30.0040.00417.70
8.1.20.0050.00317.68
8.1.10.0000.00817.77
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0000.00916.75
8.0.280.0000.00818.48
8.0.270.0000.00817.17
8.0.260.0050.00316.98
8.0.250.0000.00817.14
8.0.240.0000.00817.04
8.0.230.0000.00717.23
8.0.220.0000.00717.16
8.0.210.0030.00317.14
8.0.200.0040.00417.13
8.0.190.0060.00317.13
8.0.180.0040.00417.12
8.0.170.0000.00817.16
8.0.160.0000.00717.18
8.0.150.0000.00717.10
8.0.140.0030.00317.07
8.0.130.0000.00513.53
8.0.120.0030.00517.05
8.0.110.0080.00017.24
8.0.100.0000.00717.24
8.0.90.0040.00417.00
8.0.80.0130.00617.13
8.0.70.0000.00817.03
8.0.60.0020.00517.20
8.0.50.0030.00516.99
8.0.30.0080.01017.20
8.0.20.0100.01117.46
8.0.10.0040.00417.30
8.0.00.0100.00716.98
7.4.330.0000.00515.55
7.4.320.0050.00216.91
7.4.300.0030.00316.89
7.4.290.0030.00716.76
7.4.280.0040.00416.64
7.4.270.0030.00316.79
7.4.260.0040.00413.61
7.4.250.0070.00016.86
7.4.240.0000.00716.84
7.4.230.0080.00016.82
7.4.220.0080.01116.99
7.4.210.0090.00616.78
7.4.200.0030.00316.97
7.4.160.0130.00316.75
7.4.150.0150.00417.40
7.4.140.0080.01117.86
7.4.130.0140.01116.87
7.4.120.0080.01116.85
7.4.110.0130.01016.65
7.4.100.0140.00716.72
7.4.90.0110.01216.84
7.4.80.0070.01019.39
7.4.70.0000.01616.70
7.4.60.0140.00716.95
7.4.50.0030.01216.81
7.4.40.0100.00616.86
7.4.30.0130.00916.84
7.4.00.0040.01115.05
7.3.330.0070.00013.58
7.3.320.0050.00013.52
7.3.310.0000.00716.62
7.3.300.0000.00716.44
7.3.290.0100.00716.59
7.3.280.0090.00916.57
7.3.270.0100.01017.40
7.3.260.0080.01816.69
7.3.250.0060.01316.61
7.3.240.0080.00916.68
7.3.230.0180.00316.52
7.3.210.0000.01616.64
7.3.200.0160.00316.80
7.3.190.0120.00416.71
7.3.180.0130.00816.60
7.3.170.0100.00716.60
7.3.160.0080.00816.86
7.3.10.0280.01016.50
7.3.00.0350.00716.54
7.2.330.0120.00616.77
7.2.320.0070.01316.93
7.2.310.0030.01416.91
7.2.300.0000.01816.83
7.2.290.0100.00716.92
7.2.130.0200.01216.97
7.2.120.0210.00816.84
7.2.110.0160.01016.64
7.2.100.0180.00616.88
7.2.90.0460.00016.79
7.2.80.0140.00516.72
7.2.70.0270.01916.86
7.2.60.0760.00816.13
7.2.50.0330.00917.17
7.2.40.0470.01117.02
7.2.30.0800.00716.84
7.2.20.0300.00616.94
7.2.10.0610.00716.89
7.2.00.0330.00618.30
7.1.250.0250.00715.48
7.1.200.0120.00015.80
7.1.100.0100.00318.58
7.1.70.0000.00717.40
7.1.60.0370.01733.68
7.1.50.0670.02032.93
7.1.40.1370.02032.94
7.1.30.0730.00732.93
7.1.20.1370.00732.96
7.1.10.1230.01314.97
7.1.00.1070.01014.93
7.0.200.1330.00015.02
7.0.190.0370.01015.34
7.0.180.0270.00714.63
7.0.170.0970.01714.69
7.0.160.0570.01314.66
7.0.150.0170.01014.58
7.0.140.0970.00314.74
7.0.130.1130.01314.92
7.0.120.1130.02014.98
7.0.110.0930.01314.81
7.0.100.1000.02714.50
7.0.90.1170.01014.71
7.0.80.1130.01014.87
7.0.70.1070.01714.73
7.0.60.1170.01314.74
7.0.50.1070.01714.55
7.0.40.1130.00715.07
7.0.30.0930.01714.96
7.0.20.1070.01314.89
7.0.10.1730.01014.92
7.0.00.1230.01314.60

preferences:
46.73 ms | 401 KiB | 5 Q