3v4l.org

run code in 300+ PHP versions simultaneously
<?php $errored = FALSE; set_error_handler(function ($errno, $errstr) use (&$errored) { $errored = TRUE; return TRUE; }); $excludedClasses = [ // These cause fatal errors on instantiation "Closure", //"SQLite3", "Filter", "PDO" ]; var_dump( array_filter( get_declared_classes(), function ($className) use (&$errored, $excludedClasses) { $class = new ReflectionClass($className); if (!$class->isInstantiable() || $class->hasMethod('__construct') && (new ReflectionMethod("$className::__construct"))->isPrivate()) { return FALSE; } foreach ($excludedClasses as $bannedClass) { if (substr($className, 0, strlen($bannedClass)) === $bannedClass) { return FALSE; } } if (!(new ReflectionClass($className))->hasMethod('__toString')) { try { $errored = FALSE; $x = new $className; $x = (string)$x; return !$errored; } catch (Exception $e) { return FALSE; } } return FALSE; } ) );

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.18
8.3.50.0170.00221.02
8.3.40.0110.00418.97
8.3.30.0070.00719.25
8.3.20.0070.00020.33
8.3.10.0040.00420.34
8.3.00.0030.00619.25
8.2.180.0120.00618.29
8.2.170.0070.01122.96
8.2.160.0110.00420.39
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0070.00022.11
8.2.110.0060.00321.03
8.2.100.0040.00818.09
8.2.90.0030.00519.05
8.2.80.0050.00317.97
8.2.70.0060.00317.63
8.2.60.0110.00018.05
8.2.50.0000.00918.07
8.2.40.0040.00417.99
8.2.30.0040.00419.25
8.2.20.0000.00917.69
8.2.10.0040.00418.13
8.2.00.0000.00717.75
8.1.280.0070.01425.92
8.1.270.0000.00824.02
8.1.260.0070.00026.35
8.1.250.0030.00528.09
8.1.240.0100.00019.44
8.1.230.0060.00619.21
8.1.220.0040.00417.75
8.1.210.0040.00418.77
8.1.200.0000.01017.35
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0030.00618.66
8.1.160.0040.00422.04
8.1.150.0040.00418.78
8.1.140.0000.00717.51
8.1.130.0000.00717.84
8.1.120.0030.00317.39
8.1.110.0070.00017.50
8.1.100.0040.00417.36
8.1.90.0000.00717.48
8.1.80.0030.00417.47
8.1.70.0030.00317.36
8.1.60.0030.00617.50
8.1.50.0040.00417.46
8.1.40.0030.00517.57
8.1.30.0000.00817.66
8.1.20.0030.00617.68
8.1.10.0070.00017.65
8.1.00.0030.00617.42
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0000.00718.42
8.0.270.0000.00717.27
8.0.260.0000.00617.18
8.0.250.0070.00016.95
8.0.240.0000.00716.96
8.0.230.0030.00317.01
8.0.220.0030.00316.89
8.0.210.0030.00316.98
8.0.200.0040.00417.05
8.0.190.0060.00317.03
8.0.180.0040.00417.00
8.0.170.0000.00816.99
8.0.160.0030.00316.99
8.0.150.0000.00716.98
8.0.140.0040.00416.93
8.0.130.0060.00013.42
8.0.120.0080.00016.95
8.0.110.0000.00716.86
8.0.100.0000.00717.02
8.0.90.0000.00716.96
8.0.80.0110.00316.89
8.0.70.0070.00016.97
8.0.60.0060.00316.84
8.0.50.0040.00416.83
8.0.30.0160.00717.20
8.0.20.0120.00717.40
8.0.10.0040.00417.09
8.0.00.0080.01116.86
7.4.330.0050.00015.09
7.4.320.0040.00416.51
7.4.300.0040.00416.62
7.4.290.0030.00316.38
7.4.280.0030.00616.52
7.4.270.0040.00316.52
7.4.260.0050.00316.63
7.4.250.0000.00716.52
7.4.240.0020.00616.54
7.4.230.0000.00716.35
7.4.220.0130.00616.64
7.4.210.0030.01016.55
7.4.200.0030.00616.60
7.4.160.0100.00616.57
7.4.150.0110.00817.40
7.4.140.0130.00717.86
7.4.130.0140.00816.49
7.4.120.0060.01116.65
7.4.110.0090.00916.36
7.4.100.0070.01316.34
7.4.90.0130.00316.70
7.4.80.0070.01019.03
7.4.70.0060.01016.64
7.4.60.0140.00316.43
7.4.50.0040.00416.43
7.4.40.0030.01216.32
7.4.30.0110.00516.47
7.4.00.0160.00215.07
7.3.330.0000.00513.51
7.3.320.0030.00313.38
7.3.310.0040.00416.50
7.3.300.0000.00716.41
7.3.290.0110.00316.47
7.3.280.0080.00916.43
7.3.270.0090.00917.40
7.3.260.0070.01016.70
7.3.250.0120.00616.41
7.3.240.0070.01016.56
7.3.230.0040.01316.61
7.3.210.0150.00916.36
7.3.200.0060.01019.39
7.3.190.0110.00516.64
7.3.180.0140.00316.49
7.3.170.0130.00616.47
7.3.160.0080.00916.68
7.3.120.0110.00415.09
7.3.110.0100.00715.01
7.3.100.0060.01014.92
7.3.90.0000.01514.88
7.3.80.0040.01114.67
7.3.70.0040.00714.83
7.3.60.0150.00014.98
7.3.50.0040.01115.04
7.3.40.0070.00314.94
7.3.30.0030.01214.92
7.3.20.0000.01516.82
7.3.10.0040.01316.68
7.3.00.0080.00516.60
7.2.330.0060.01116.50
7.2.320.0060.01216.78
7.2.310.0090.00916.71
7.2.300.0110.00516.75
7.2.290.0130.00316.76
7.2.250.0100.01015.25
7.2.240.0060.01514.96
7.2.230.0070.00715.24
7.2.220.0040.01414.95
7.2.210.0040.01214.71
7.2.200.0090.00614.81
7.2.190.0000.01214.95
7.2.180.0030.01014.91
7.2.170.0040.01115.05
7.2.130.0040.01116.91
7.2.120.0070.01016.95
7.2.110.0030.01316.85
7.2.100.0060.00916.82
7.2.90.0000.01017.14
7.2.80.0060.01016.73
7.2.70.0030.01316.80
7.2.60.0060.00716.84
7.2.50.0040.01116.95
7.2.40.0030.01016.91
7.2.30.0000.01416.95
7.2.20.0030.00716.79
7.2.10.0070.00716.69
7.2.00.0030.01017.95
7.1.330.0070.01115.88
7.1.320.0090.00615.99
7.1.310.0070.01015.94
7.1.300.0040.00915.91
7.1.290.0000.01615.64
7.1.280.0030.01015.94
7.1.270.0070.00715.72
7.1.260.0070.01015.70
7.1.250.0030.01015.95
7.1.200.0040.01215.49
7.1.100.0000.01018.30
7.1.70.0070.00717.18
7.1.60.0110.00719.32
7.1.50.0070.01016.89
7.1.00.0070.07022.32
7.0.200.0030.00616.86
7.0.140.0000.07721.95
7.0.60.0000.04319.92
7.0.50.0130.07717.86
7.0.40.0030.05020.11
7.0.30.0300.07720.30
7.0.20.0070.05020.07
7.0.10.0270.07020.14
7.0.00.0000.04320.06
5.6.280.0030.07723.22
5.6.210.0070.07722.66
5.6.200.0130.07718.35
5.6.190.0030.04722.76
5.6.180.0470.08022.70
5.6.170.0470.05022.71
5.6.160.0070.05022.71
5.6.150.0070.05018.47
5.6.140.0130.07318.41
5.6.130.0030.04018.41
5.6.120.0130.05723.19
5.6.110.0200.06023.36
5.6.100.0030.04323.21
5.6.90.0070.05723.31
5.6.80.0100.08022.77
5.5.350.0230.07722.55
5.5.340.0130.08018.07
5.5.330.0070.06022.29
5.5.320.0230.04722.43
5.5.310.0230.06322.29
5.5.300.0130.06317.98
5.5.290.0030.06318.00
5.5.280.0030.05322.87
5.5.270.0070.05722.82
5.5.260.0100.07722.98
5.5.250.0030.07022.68
5.5.240.0200.06722.36
5.4.450.0270.05320.23
5.4.440.0670.06320.17
5.4.430.1400.05320.41
5.4.420.0670.00020.50
5.4.410.0730.00020.38
5.4.400.0630.00020.21
5.4.390.0670.00019.91
5.4.380.0430.05019.41
5.4.370.0530.07719.52
5.4.360.0500.06719.47
5.4.350.0500.07719.66
5.4.340.0300.05719.59
5.4.320.0030.03812.63
5.4.310.0060.03712.62
5.4.300.0070.04312.62
5.4.290.0050.03812.62
5.4.280.0030.03812.51
5.4.270.0050.03812.52
5.4.260.0090.03412.51
5.4.250.0060.03812.52
5.4.240.0070.03512.51
5.4.230.0050.03812.51
5.4.220.0040.03812.51
5.4.210.0050.03612.50
5.4.200.0070.03712.51
5.4.190.0070.03412.50
5.4.180.0070.03612.50
5.4.170.0060.03712.52
5.4.160.0070.03912.52
5.4.150.0050.04112.51
5.4.140.0090.03512.20
5.4.130.0080.03912.18
5.4.120.0070.04212.14
5.4.110.0090.03912.13
5.4.100.0060.03412.14
5.4.90.0020.04412.14
5.4.80.0080.04012.14
5.4.70.0070.04312.13
5.4.60.0070.03912.13
5.4.50.0060.03412.13
5.4.40.0030.03712.12
5.4.30.0080.03312.12
5.4.20.0060.03612.11
5.4.10.0090.03312.11
5.4.00.0050.03711.60
5.3.290.0050.04112.80
5.3.280.0060.03612.71
5.3.270.0060.03712.73
5.3.260.0070.03612.72
5.3.250.0040.03712.72
5.3.240.0070.03412.72
5.3.230.0040.03812.71
5.3.220.0060.03612.68
5.3.210.0030.04112.68
5.3.200.0060.03512.68
5.3.190.0040.03912.68
5.3.180.0040.04012.68
5.3.170.0040.03712.66
5.3.160.0050.03812.67
5.3.150.0050.03812.67
5.3.140.0070.03612.66
5.3.130.0080.04212.66
5.3.120.0050.04412.66
5.3.110.0040.04212.65
5.3.100.0070.03512.13
5.3.90.0070.03512.11
5.3.80.0070.03412.10
5.3.70.0070.04012.10
5.3.60.0060.03412.08
5.3.50.0060.03712.02
5.3.40.0070.03412.02
5.3.30.0060.03411.98
5.3.20.0050.04011.76
5.3.10.0040.03511.73
5.3.00.0100.03011.72
5.2.170.0080.0269.18
5.2.160.0040.0289.18
5.2.150.0040.0309.18
5.2.140.0030.0319.18
5.2.130.0060.0269.14
5.2.120.0030.0299.14
5.2.110.0020.0359.14
5.2.100.0060.0279.14
5.2.90.0030.0309.14
5.2.80.0050.0299.14
5.2.70.0040.0309.13
5.2.60.0050.0309.09
5.2.50.0040.0309.06
5.2.40.0050.0289.04
5.2.30.0030.0319.01
5.2.20.0030.0309.00
5.2.10.0060.0278.93
5.2.00.0070.0278.79
5.1.60.0020.0268.07
5.1.50.0050.0258.07
5.1.40.0030.0258.05
5.1.30.0100.0278.40
5.1.20.0060.0318.42
5.1.10.0030.0268.15
5.1.00.0050.0248.14
5.0.50.0040.0296.63
5.0.40.0040.0276.49
5.0.30.0020.0316.29
5.0.20.0040.0186.27
5.0.10.0040.0186.24
5.0.00.0050.0306.24
4.4.90.0030.0224.78
4.4.80.0020.0204.75
4.4.70.0000.0174.75
4.4.60.0010.0254.76
4.4.50.0020.0174.77
4.4.40.0040.0234.71
4.4.30.0010.0164.76
4.4.20.0030.0144.84
4.4.10.0010.0164.85
4.4.00.0010.0264.76
4.3.110.0030.0144.67
4.3.100.0030.0144.66
4.3.90.0020.0164.64
4.3.80.0050.0244.58
4.3.70.0030.0144.63
4.3.60.0000.0174.63
4.3.50.0010.0164.63
4.3.40.0020.0244.54
4.3.30.0020.0163.29
4.3.20.0010.0173.27
4.3.10.0020.0163.21
4.3.00.0230.01315.60

preferences:
42.06 ms | 401 KiB | 5 Q