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); 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 { $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.0040.01218.56
8.3.50.0090.00616.20
8.3.40.0040.01118.80
8.3.30.0100.00718.87
8.3.20.0040.00420.33
8.3.10.0050.00320.61
8.3.00.0080.00019.38
8.2.180.0110.00725.92
8.2.170.0070.00718.91
8.2.160.0120.00920.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00022.06
8.2.110.0040.00420.11
8.2.100.0040.00717.97
8.2.90.0040.00419.08
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0090.00317.93
8.2.50.0040.00418.07
8.2.40.0040.00418.05
8.2.30.0000.00719.15
8.2.20.0060.00317.88
8.2.10.0050.00218.12
8.2.00.0000.00717.68
8.1.280.0040.01125.92
8.1.270.0050.00323.96
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00323.89
8.1.230.0110.00018.97
8.1.220.0050.00317.80
8.1.210.0050.00518.77
8.1.200.0060.00317.35
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0060.00318.59
8.1.160.0040.00422.04
8.1.150.0000.00719.00
8.1.140.0040.00417.47
8.1.130.0030.00317.91
8.1.120.0040.00417.56
8.1.110.0040.00417.44
8.1.100.0000.00817.49
8.1.90.0000.00717.48
8.1.80.0000.00717.38
8.1.70.0070.00017.42
8.1.60.0000.00817.70
8.1.50.0080.00017.41
8.1.40.0030.00517.56
8.1.30.0000.00817.69
8.1.20.0000.00817.72
8.1.10.0000.00717.45
8.1.00.0000.00717.55
8.0.300.0000.00818.77
8.0.290.0000.00816.75
8.0.280.0030.00318.46
8.0.270.0000.00717.27
8.0.260.0000.00817.28
8.0.250.0030.00317.02
8.0.240.0000.00716.90
8.0.230.0000.00717.01
8.0.220.0070.00016.98
8.0.210.0000.00717.01
8.0.200.0050.00316.96
8.0.190.0000.00917.11
8.0.180.0000.00716.96
8.0.170.0040.00417.06
8.0.160.0050.00317.04
8.0.150.0040.00416.80
8.0.140.0000.00716.89
8.0.130.0030.00313.32
8.0.120.0050.00316.89
8.0.110.0000.00816.95
8.0.100.0050.00316.91
8.0.90.0070.00016.79
8.0.80.0060.00917.00
8.0.70.0000.00816.92
8.0.60.0040.00416.93
8.0.50.0000.00716.90
8.0.30.0120.00617.21
8.0.20.0080.01617.40
8.0.10.0020.00517.13
8.0.00.0120.00616.53
7.4.330.0000.00515.00
7.4.320.0030.00316.47
7.4.300.0000.00616.43
7.4.290.0000.00716.50
7.4.280.0050.00216.61
7.4.270.0000.00716.52
7.4.260.0030.00516.50
7.4.250.0030.00516.58
7.4.240.0040.00416.51
7.4.230.0000.00716.36
7.4.220.0070.01116.46
7.4.210.0070.01416.46
7.4.200.0090.00016.43
7.4.160.0140.00416.64
7.4.150.0060.01217.40
7.4.140.0110.00917.86
7.4.130.0090.01116.48
7.4.120.0070.01016.49
7.4.110.0100.00716.45
7.4.100.0120.00916.56
7.4.90.0100.00716.53
7.4.80.0120.00619.03
7.4.70.0110.00616.57
7.4.60.0060.01016.61
7.4.50.0000.00816.35
7.4.40.0090.01216.63
7.4.30.0070.01016.64
7.4.00.0000.01515.13
7.3.330.0000.00513.30
7.3.320.0000.00513.25
7.3.310.0040.00416.29
7.3.300.0000.00716.37
7.3.290.0080.01216.45
7.3.280.0070.01216.45
7.3.270.0030.01417.40
7.3.260.0140.00316.52
7.3.250.0090.00816.39
7.3.240.0100.01016.57
7.3.230.0070.01116.39
7.3.210.0150.00316.50
7.3.200.0100.01019.39
7.3.190.0130.00316.67
7.3.180.0100.00716.39
7.3.170.0080.00816.59
7.3.160.0140.00716.51
7.2.330.0130.00416.55
7.2.320.0110.00816.73
7.2.310.0080.00816.77
7.2.300.0140.02616.77
7.2.290.0100.00716.58
7.2.60.0080.00416.98
7.2.00.0030.01019.41
7.1.200.0050.00915.40
7.1.100.0000.00918.27
7.1.70.0040.00417.07
7.1.60.0080.00419.32
7.1.50.0090.01217.02
7.1.00.0070.07322.31
7.0.200.0000.00816.94
7.0.140.0000.07721.93
7.0.60.0100.08020.02
7.0.50.0100.05017.88
7.0.40.0100.06320.21
7.0.30.0570.06020.06
7.0.20.0270.08320.25
7.0.10.0230.06720.13
7.0.00.0100.07320.23
5.6.280.0000.08023.23
5.6.210.0070.04022.58
5.6.200.0100.03718.51
5.6.190.0030.04722.73
5.6.180.0270.04722.66
5.6.170.0300.08322.58
5.6.160.0100.08722.70
5.6.150.0070.08018.41
5.6.140.0000.04318.50
5.6.130.0030.07318.33
5.6.120.0030.04323.39
5.6.110.0070.08323.39
5.6.100.0100.08323.27
5.6.90.0070.06723.40
5.6.80.0030.04322.80
5.6.70.0000.08722.72
5.5.350.0070.06022.68
5.5.340.0000.04718.08
5.5.330.0100.03722.33
5.5.320.0330.07722.28
5.5.310.0330.06322.25
5.5.300.0070.03717.95
5.5.290.0100.05317.96
5.5.280.0100.06722.95
5.5.270.0000.04322.85
5.5.260.0170.09022.98
5.5.250.0100.07322.87
5.5.240.0130.05322.38
5.4.450.0300.03020.04
5.4.440.1000.06020.39
5.4.430.1070.06320.26
5.4.420.0700.00020.31
5.4.410.0670.00020.15
5.4.400.0830.00019.90
5.4.390.0670.00019.84
5.4.380.0470.05019.42
5.4.370.0230.06319.55
5.4.360.1230.07019.54
5.4.350.0370.05019.56
5.4.340.0300.06719.41
5.4.320.0040.04012.63
5.4.310.0060.04312.62
5.4.300.0060.04212.63
5.4.290.0040.04112.63
5.4.280.0050.03712.52
5.4.270.0080.03912.52
5.4.260.0070.03912.52
5.4.250.0040.04012.52
5.4.240.0090.03412.52
5.4.230.0040.04112.51
5.4.220.0040.03912.51
5.4.210.0040.04812.52
5.4.200.0080.03912.51
5.4.190.0100.03312.51
5.4.180.0040.04312.51
5.4.170.0060.04512.52
5.4.160.0080.04012.52
5.4.150.0060.04312.51
5.4.140.0100.03512.19
5.4.130.0080.03312.19
5.4.120.0020.03912.14
5.4.110.0060.03512.14
5.4.100.0070.03412.14
5.4.90.0080.03412.14
5.4.80.0070.03512.14
5.4.70.0050.03812.14
5.4.60.0080.03512.13
5.4.50.0070.03812.14
5.4.40.0050.03912.13
5.4.30.0080.03612.12
5.4.20.0090.03912.12
5.4.10.0070.03512.12
5.4.00.0070.03711.61
5.3.290.0070.04112.80
5.3.280.0060.03612.71
5.3.270.0030.04112.72
5.3.260.0080.04412.72
5.3.250.0070.03912.71
5.3.240.0080.04412.72
5.3.230.0060.04212.71
5.3.220.0020.04012.68
5.3.210.0060.04412.68
5.3.200.0080.03712.68
5.3.190.0040.03812.68
5.3.180.0060.03512.68
5.3.170.0050.03812.67
5.3.160.0080.03312.68
5.3.150.0050.04212.68
5.3.140.0070.03912.66
5.3.130.0070.03912.66
5.3.120.0050.04112.66
5.3.110.0100.03512.65
5.3.100.0090.03312.13
5.3.90.0070.03812.10
5.3.80.0070.03412.09
5.3.70.0060.03412.10
5.3.60.0070.03312.08
5.3.50.0080.03212.02
5.3.40.0050.03612.02
5.3.30.0070.03211.98
5.3.20.0070.04011.77
5.3.10.0070.03711.73
5.3.00.0060.04811.72
5.2.170.0030.0309.18
5.2.160.0060.0339.18
5.2.150.0030.0329.18
5.2.140.0070.0279.18
5.2.130.0040.0289.14
5.2.120.0070.0329.14
5.2.110.0110.0279.15
5.2.100.0050.0279.14
5.2.90.0050.0369.14
5.2.80.0090.0249.14
5.2.70.0050.0289.14
5.2.60.0050.0339.09
5.2.50.0060.0289.07
5.2.40.0050.0279.03
5.2.30.0050.0319.02
5.2.20.0060.0279.00
5.2.10.0040.0328.92
5.2.00.0040.0288.78
5.1.60.0030.0298.07
5.1.50.0050.0318.07
5.1.40.0020.0258.04
5.1.30.0030.0268.40
5.1.20.0060.0248.42
5.1.10.0060.0238.14
5.1.00.0060.0268.14
5.0.50.0040.0206.62
5.0.40.0040.0196.49
5.0.30.0010.0336.29
5.0.20.0050.0176.26
5.0.10.0030.0196.24
5.0.00.0020.0376.24
4.4.90.0020.0174.78
4.4.80.0020.0164.75
4.4.70.0030.0154.75
4.4.60.0020.0184.75
4.4.50.0040.0164.77
4.4.40.0040.0264.71
4.4.30.0060.0184.76
4.4.20.0030.0154.85
4.4.10.0030.0154.84
4.4.00.0040.0224.76
4.3.110.0040.0144.67
4.3.100.0040.0224.66
4.3.90.0020.0154.63
4.3.80.0050.0224.58
4.3.70.0030.0174.63
4.3.60.0030.0154.62
4.3.50.0030.0144.63
4.3.40.0020.0314.54
4.3.30.0000.0173.29
4.3.20.0030.0143.27
4.3.10.0020.0163.22
4.3.00.0000.01315.60

preferences:
51.57 ms | 400 KiB | 5 Q