3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace foo\bar; function get_declared_classes($in_namespace = null) { if ($in_namespace === null) { return \get_declared_classes(); } if ($in_namespace{0} == '\\') { $in_namespace = substr($in_namespace, 1); } if (substr($in_namespace, -1) != '\\') { $in_namespace .= '\\'; } $filter = new \RegexIterator(new \ArrayIterator(\get_declared_classes()), '/^' .\preg_quote($in_namespace). '.*$'); return \iterator_to_array($filter); } var_dump(get_declared_classes("foo\bar"));

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.0140.00318.56
8.3.50.0110.00921.97
8.3.40.0060.00918.45
8.3.30.0090.00618.54
8.3.20.0100.00020.25
8.3.10.0000.00823.66
8.3.00.0050.00319.13
8.2.180.0070.00716.38
8.2.170.0110.00422.96
8.2.160.0120.00320.11
8.2.150.0080.00024.18
8.2.140.0050.00224.66
8.2.130.0080.00017.50
8.2.120.0040.00426.35
8.2.110.0090.00022.08
8.2.100.0060.00617.79
8.2.90.0040.00419.00
8.2.80.0040.00417.97
8.2.70.0040.00417.38
8.2.60.0050.00317.78
8.2.50.0030.00518.07
8.2.40.0070.00019.43
8.2.30.0000.00720.67
8.2.20.0000.00817.40
8.2.10.0000.00817.96
8.2.00.0070.00017.82
8.1.280.0070.01425.92
8.1.270.0030.00524.02
8.1.260.0070.00028.09
8.1.250.0050.00328.09
8.1.240.0040.00422.48
8.1.230.0110.00017.54
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.10
8.1.190.0000.00917.23
8.1.180.0080.00018.10
8.1.170.0040.00418.71
8.1.160.0000.00721.98
8.1.150.0070.00018.75
8.1.140.0030.00519.45
8.1.130.0030.00317.57
8.1.120.0030.00617.23
8.1.110.0040.00417.32
8.1.100.0030.00517.33
8.1.90.0040.00417.27
8.1.80.0040.00417.30
8.1.70.0040.00417.23
8.1.60.0040.00417.45
8.1.50.0040.00417.23
8.1.40.0000.01017.36
8.1.30.0000.00817.52
8.1.20.0040.00417.51
8.1.10.0040.00417.29
8.1.00.0030.00517.34
8.0.300.0000.00818.77
8.0.290.0050.00316.63
8.0.280.0000.00718.38
8.0.270.0040.00417.04
8.0.260.0000.00817.13
8.0.250.0060.00016.79
8.0.240.0040.00416.79
8.0.230.0050.00216.93
8.0.220.0070.00016.78
8.0.210.0040.00416.75
8.0.200.0070.00016.93
8.0.190.0000.00716.84
8.0.180.0030.00516.86
8.0.170.0040.00416.84
8.0.160.0000.00816.69
8.0.150.0090.00016.77
8.0.140.0040.00416.67
8.0.130.0060.00013.20
8.0.120.0000.00816.73
8.0.110.0050.00216.82
8.0.100.0020.00516.90
8.0.90.0000.00716.83
8.0.80.0060.00916.72
8.0.70.0000.00816.68
8.0.60.0050.00316.84
8.0.50.0040.00416.67
8.0.30.0150.00316.74
8.0.20.0080.01017.40
8.0.10.0040.00416.76
8.0.00.0090.00716.47
7.4.330.0000.00516.84
7.4.320.0060.00016.57
7.4.300.0030.00316.55
7.4.290.0050.00216.64
7.4.280.0040.00416.64
7.4.270.0040.00416.45
7.4.260.0030.00316.69
7.4.250.0040.00416.63
7.4.240.0020.00616.61
7.4.230.0030.00516.76
7.4.220.0090.00916.68
7.4.210.0080.00616.59
7.4.200.0070.00016.75
7.4.160.0100.00616.39
7.4.150.0110.00617.40
7.4.140.0090.01217.86
7.4.130.0120.00716.72
7.4.120.0100.01116.52
7.4.110.0140.00416.53
7.4.100.0110.00716.39
7.4.90.0110.00616.57
7.4.80.0050.01419.39
7.4.70.0020.00116.73
7.4.60.0070.01016.71
7.4.50.0060.00816.57
7.4.40.0100.00616.66
7.4.30.0070.01016.71
7.4.00.0070.00714.97
7.3.330.0050.00013.43
7.3.320.0050.00013.28
7.3.310.0000.00716.31
7.3.300.0000.00716.29
7.3.290.0000.00716.37
7.3.280.0100.00716.39
7.3.270.0110.00717.40
7.3.260.0110.00616.63
7.3.250.0120.00516.63
7.3.240.0120.00716.51
7.3.230.0140.00316.63
7.3.210.0070.01016.56
7.3.200.0040.01416.66
7.3.190.0110.00516.48
7.3.180.0070.01016.43
7.3.170.0100.00716.62
7.3.160.0120.00416.41
7.2.330.0110.00616.72
7.2.320.0140.00416.67
7.2.310.0070.01116.75
7.2.300.0070.01016.41
7.2.290.0070.01016.79
7.2.60.0090.00616.95
7.2.00.0040.00819.67
7.1.200.0000.01415.82
7.1.100.0040.00818.16
7.1.70.0070.00017.27
7.1.60.0070.01519.12
7.1.50.0000.02216.86
7.1.00.0070.07322.54
7.0.200.0100.00016.83
7.0.60.0070.07719.91
7.0.50.0030.04017.90
7.0.40.0100.04020.09
7.0.30.0130.04720.07
7.0.20.0300.08320.23
7.0.10.0030.08320.35
7.0.00.0070.06320.25
5.6.280.0030.07321.12
5.6.210.0130.07320.57
5.6.200.0100.07718.27
5.6.190.0100.08320.61
5.6.180.0470.07020.41
5.6.170.0470.06720.47
5.6.160.0100.08020.70
5.6.150.0000.05318.12
5.6.140.0100.03718.20
5.6.130.0030.08318.15
5.6.120.0070.07021.00
5.6.110.0100.09021.11
5.6.100.0170.07021.14
5.6.90.0100.08020.88
5.6.80.0100.07720.28
5.5.350.4070.04320.36
5.5.340.0100.07718.07
5.5.330.0100.04720.40
5.5.320.0030.08720.30
5.5.310.0300.05320.35
5.5.300.0130.08017.98
5.5.290.0130.07317.96
5.5.280.0030.07020.84
5.5.270.0070.05320.76
5.5.260.0100.08320.79
5.5.250.0100.07720.62
5.5.240.0270.07720.13

preferences:
57.98 ms | 401 KiB | 5 Q