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) { $errored = FALSE; $class = new ReflectionClass($className); $constructor = $class->getMethod('__construct'); $constructor->setAccessible(true); if (!$class->isInstantiable() || $class->hasMethod('__construct') && $constructor->isPrivate()) { return FALSE; } foreach ($excludedClasses as $bannedClass) { if (substr($className, 0, strlen($bannedClass)) === $bannedClass) { return FALSE; } } if (!(new ReflectionClass($className))->hasMethod('__toString')) { try { $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.40.0070.00718.90
8.3.30.0070.00719.22
8.3.20.0040.00420.30
8.3.10.0040.00420.66
8.3.00.0030.00619.38
8.2.170.0100.00722.96
8.2.160.0070.00720.64
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0000.00822.23
8.2.110.0030.00620.35
8.2.100.0080.00317.78
8.2.90.0000.00819.05
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0050.00517.92
8.2.50.0000.00918.07
8.2.40.0030.00518.16
8.2.30.0050.00319.34
8.2.20.0030.00517.84
8.2.10.0030.00518.14
8.2.00.0040.00417.72
8.1.270.0000.00823.82
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0090.00023.86
8.1.230.0060.00619.25
8.1.220.0040.00417.76
8.1.210.0030.00518.77
8.1.200.0060.00617.35
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0000.00818.59
8.1.160.0040.00422.12
8.1.150.0000.00718.81
8.1.140.0060.00317.42
8.1.130.0000.00717.79
8.1.120.0040.00417.52
8.1.110.0040.00417.50
8.1.100.0000.00717.37
8.1.90.0000.00717.60
8.1.80.0040.00417.55
8.1.70.0000.00717.46
8.1.60.0030.00717.57
8.1.50.0000.00817.47
8.1.40.0040.00417.61
8.1.30.0040.00417.60
8.1.20.0050.00317.59
8.1.10.0040.00417.48
8.1.00.0030.00617.55
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.38
8.0.270.0070.00017.36
8.0.260.0060.00017.23
8.0.250.0000.00617.12
8.0.240.0040.00416.98
8.0.230.0040.00417.03
8.0.220.0070.00016.89
8.0.210.0070.00017.03
8.0.200.0040.00416.98
8.0.190.0030.00516.89
8.0.180.0030.00316.94
8.0.170.0050.00317.01
8.0.160.0000.00716.86
8.0.150.0000.00716.98
8.0.140.0000.00816.85
8.0.130.0000.00513.46
8.0.120.0000.00816.94
8.0.110.0040.00416.91
8.0.100.0000.00816.92
8.0.90.0000.00716.88
8.0.80.0120.00317.05
8.0.70.0040.00416.86
8.0.60.0070.00016.90
8.0.50.0040.00417.05
8.0.30.0060.01217.13
8.0.20.0140.01117.40
8.0.10.0000.00717.06
8.0.00.0090.01016.91
7.4.330.0020.00215.15
7.4.320.0030.00316.64
7.4.300.0000.00616.52
7.4.290.0000.00716.62
7.4.280.0000.00716.63
7.4.270.0000.00816.53
7.4.260.0050.00216.66
7.4.250.0080.00016.64
7.4.240.0050.00216.61
7.4.230.0000.00716.72
7.4.220.0110.00616.57
7.4.210.0050.00816.66
7.4.200.0080.00016.53
7.4.160.0120.00816.69
7.4.150.0080.00817.40
7.4.140.0110.00717.86
7.4.130.0090.00916.53
7.4.120.0110.00916.63
7.4.110.0170.00016.65
7.4.100.0030.01316.72
7.4.90.0110.00716.55
7.4.80.0070.01319.03
7.4.70.0180.00016.45
7.4.60.0040.02116.64
7.4.50.0060.00316.34
7.4.40.0100.00616.63
7.4.30.0070.01016.63
7.4.00.0000.01514.96
7.3.330.0060.00013.37
7.3.320.0030.00313.39
7.3.310.0040.00416.37
7.3.300.0030.00316.26
7.3.290.0060.00916.28
7.3.280.0090.00916.36
7.3.270.0060.01117.40
7.3.260.0100.00716.39
7.3.250.0110.01316.49
7.3.240.0120.00616.59
7.3.230.0030.01316.39
7.3.210.0080.00816.59
7.3.200.0140.00719.39
7.3.190.0070.01016.55
7.3.180.0090.00616.65
7.3.170.0030.01416.55
7.3.160.0160.00016.51
7.2.330.0180.00316.69
7.2.320.0060.01216.66
7.2.310.0100.00716.65
7.2.300.0070.01016.59
7.2.290.0100.01016.71
7.2.60.0000.01416.91
7.2.00.0030.01219.16
7.1.200.0200.00015.64
7.1.100.0000.01318.14
7.1.70.0030.00616.92
7.1.60.0110.00719.32
7.1.50.0070.01516.96
7.1.00.0100.07022.33
7.0.200.0080.00816.63
7.0.140.0030.07321.95
7.0.60.0070.08319.79
7.0.50.0130.07317.82
7.0.40.0270.06720.27
7.0.30.0370.06720.07
7.0.20.0230.08320.16
7.0.10.0100.07320.23
7.0.00.0130.06720.25
5.6.280.0070.07020.96
5.6.210.0070.04320.76
5.6.200.0070.08318.13
5.6.190.0100.06320.46
5.6.180.0330.03720.61
5.6.170.0370.07720.51
5.6.160.0130.08320.52
5.6.150.0130.07318.21
5.6.140.0030.07018.19
5.6.130.0070.03718.23
5.6.120.0000.09320.97
5.6.110.0170.07721.04
5.6.100.0070.04321.01
5.6.90.0070.08021.02
5.6.80.0070.08320.45
5.5.350.0100.05020.48
5.5.340.0100.07718.02
5.5.330.0000.05020.13
5.5.320.0430.09320.51
5.5.310.0130.05020.20
5.5.300.0030.07718.07
5.5.290.0070.08018.07
5.5.280.0070.06320.95
5.5.270.0070.09020.84
5.5.260.0030.08320.84
5.5.250.0030.04320.74
5.5.240.0200.07720.18
5.4.450.0200.05719.39
5.4.440.0200.06719.39
5.4.430.0270.07719.19
5.4.420.0300.06319.48
5.4.410.0270.05319.04
5.4.400.0230.04019.23
5.4.390.0200.08319.22
5.4.380.0370.06719.13
5.4.370.0200.06019.23
5.4.360.0300.05319.22
5.4.350.0170.04318.98
5.4.340.0200.05719.09
5.4.320.0270.05319.22
5.4.310.0270.06318.99
5.4.300.0230.04019.08
5.4.290.0300.04018.84
5.4.280.0270.03719.08
5.4.270.0270.04318.98
5.4.260.0200.05319.21
5.4.250.0270.05018.88
5.4.240.0370.06018.98
5.4.230.0300.06719.13
5.4.220.0170.05718.94
5.4.210.0170.05319.31
5.4.200.0270.04319.19
5.4.190.0100.04019.13
5.4.180.0170.04319.08
5.4.170.0270.05319.21
5.4.160.0170.05018.85
5.4.150.0200.06018.89
5.4.140.0330.05016.47
5.4.130.0270.05716.40
5.4.120.0230.06316.37
5.4.110.0270.05716.50
5.4.100.0270.05016.61
5.4.90.0230.07316.46
5.4.80.0130.06016.41
5.4.70.0300.05016.62
5.4.60.0230.04016.38
5.4.50.0300.06716.36
5.4.40.0270.04316.48
5.4.30.0300.05716.37
5.4.20.0300.06716.58
5.4.10.0300.05716.58
5.4.00.0270.05015.83
5.3.290.0230.07315.66
5.3.280.0200.04715.66
5.3.270.0170.06715.66
5.3.260.0170.03715.66
5.3.250.0230.04715.66
5.3.240.0300.05015.66
5.3.230.0200.07715.66
5.3.220.0330.03715.66
5.3.210.0230.08715.66
5.3.200.0330.07015.66
5.3.190.0170.07715.66
5.3.180.0230.07715.66
5.3.170.0170.06315.66
5.3.160.0200.05715.66
5.3.150.0230.04315.66
5.3.140.0230.06315.66
5.3.130.0270.07715.66
5.3.120.0230.04015.66
5.3.110.0170.05715.66
5.3.100.0300.05315.66
5.3.90.0200.04715.66
5.3.80.0270.05715.66
5.3.70.0230.07015.66
5.3.60.0270.06315.66
5.3.50.0330.06315.66
5.3.40.0230.05315.66
5.3.30.0170.06315.66
5.3.20.0230.03715.66
5.3.10.0430.04315.66
5.3.00.0230.07315.66
5.2.170.0200.06015.66
5.2.160.0300.03315.66
5.2.150.0300.05315.66
5.2.140.0200.04715.66
5.2.130.0170.03315.66
5.2.120.0230.05315.66
5.2.110.0200.06015.66
5.2.100.0230.04315.66
5.2.90.0230.05715.66
5.2.80.0200.05315.66
5.2.70.0300.05315.66
5.2.60.0300.03715.66
5.2.50.0200.06015.66
5.2.40.0270.05015.66
5.2.30.0170.06315.66
5.2.20.0270.04315.66
5.2.10.0130.05015.66
5.2.00.0300.05015.66
5.1.60.0200.04015.66
5.1.50.0230.02315.66
5.1.40.0370.04315.66
5.1.30.0230.04315.66
5.1.20.0130.05715.66
5.1.10.0230.04715.66
5.1.00.0230.05015.66
5.0.50.0130.03315.66
5.0.40.0130.03015.66
5.0.30.0070.06315.66
5.0.20.0070.02015.66
5.0.10.0070.03715.66
5.0.00.0100.05715.66
4.4.90.0070.03715.66
4.4.80.0100.03015.66
4.4.70.0100.03715.66
4.4.60.0100.03315.66
4.4.50.0070.03715.66
4.4.40.0170.04015.66
4.4.30.0170.02715.66
4.4.20.0070.03315.66
4.4.10.0130.03315.66
4.4.00.0100.03315.66
4.3.110.0100.03315.66
4.3.100.0100.01715.66
4.3.90.0170.02715.66
4.3.80.0100.05315.66
4.3.70.0070.02315.66
4.3.60.0170.02315.66
4.3.50.0130.03015.66
4.3.40.0130.03315.66
4.3.30.0000.03715.66
4.3.20.0130.01715.66
4.3.10.0070.03015.66
4.3.00.0070.03315.66

preferences:
36.34 ms | 400 KiB | 5 Q