3v4l.org

run code in 300+ PHP versions simultaneously
<?php $classNames = array( "Foo", // userland class "StdClass", // class defined by php-src, but still not considered as internal "ReflectionClass", // internal class "ArrayObject", // internal class implementing Serializable ); foreach($classNames as $className) { var_dump(instanitateWithoutConstructorThroughUnserialize($className)); var_dump(instanitateWithoutConstructorThroughReflection($className)); } function instanitateWithoutConstructorThroughUnserialize($className) { return unserialize(sprintf('O:%d:"%s":0:{}', strlen($className), $className)); } function instanitateWithoutConstructorThroughReflection($className) { try { $ref = new ReflectionClass($className); return $ref->newInstanceWithoutConstructor(); } catch (ReflectionException $e) { return $e; } } class Foo {}

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.0060.00916.63
8.3.50.0140.00722.01
8.3.40.0070.00718.70
8.3.30.0030.01219.12
8.3.20.0040.00420.29
8.3.10.0050.00323.53
8.3.00.0030.00519.26
8.2.180.0070.01418.29
8.2.170.0090.01222.96
8.2.160.0070.00720.22
8.2.150.0040.00424.18
8.2.140.0040.01124.66
8.2.130.0110.00326.16
8.2.120.0020.00522.30
8.2.110.0000.01022.13
8.2.100.0070.00417.97
8.2.90.0050.00519.05
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0070.00417.91
8.2.50.0040.00418.07
8.2.40.0050.00319.88
8.2.30.0040.00418.14
8.2.20.0080.00017.68
8.2.10.0050.00218.15
8.2.00.0030.00517.91
8.1.280.0100.00725.92
8.1.270.0040.00423.96
8.1.260.0000.01626.35
8.1.250.0030.00728.09
8.1.240.0090.00023.91
8.1.230.0030.00719.01
8.1.220.0070.00017.74
8.1.210.0030.00618.77
8.1.200.0070.00317.47
8.1.190.0040.00417.35
8.1.180.0030.00518.10
8.1.170.0080.00018.58
8.1.160.0070.00022.05
8.1.150.0000.00818.63
8.1.140.0050.00517.44
8.1.130.0000.00717.91
8.1.120.0050.00217.39
8.1.110.0040.00417.47
8.1.100.0000.00717.44
8.1.90.0040.00417.40
8.1.80.0040.00317.40
8.1.70.0030.00317.44
8.1.60.0070.00317.58
8.1.50.0000.01017.54
8.1.40.0090.00317.59
8.1.30.0080.00017.64
8.1.20.0040.00417.64
8.1.10.0000.00817.56
8.1.00.0030.00617.50
8.0.300.0050.00218.77
8.0.290.0000.00717.18
8.0.280.0070.00018.40
8.0.270.0040.00217.30
8.0.260.0040.00417.29
8.0.250.0030.00316.96
8.0.240.0000.00716.93
8.0.230.0000.00716.96
8.0.220.0030.00317.02
8.0.210.0030.00317.03
8.0.200.0000.00817.06
8.0.190.0060.00317.06
8.0.180.0040.00416.98
8.0.170.0070.00016.96
8.0.160.0040.00416.96
8.0.150.0030.00316.89
8.0.140.0050.00216.86
8.0.130.0030.00313.40
8.0.120.0040.00416.95
8.0.110.0040.00416.82
8.0.100.0040.00416.98
8.0.90.0070.00017.11
8.0.80.0040.01217.00
8.0.70.0000.00716.88
8.0.60.0000.00816.95
8.0.50.0040.00417.03
8.0.30.0120.01317.20
8.0.20.0050.01817.40
8.0.10.0040.00416.95
8.0.00.0100.00916.88
7.4.330.0000.00615.14
7.4.320.0000.00816.61
7.4.300.0030.00316.64
7.4.290.0030.00716.54
7.4.280.0040.00416.67
7.4.270.0050.00216.61
7.4.260.0030.00316.66
7.4.250.0000.00716.64
7.4.240.0010.00616.59
7.4.230.0030.00316.45
7.4.220.0060.01216.66
7.4.210.0080.00716.68
7.4.200.0030.00516.43
7.4.190.0040.00416.75
7.4.160.0100.00816.35
7.4.150.0090.01217.40
7.4.140.0090.01117.86
7.4.130.0130.00416.58
7.4.120.0090.00916.58
7.4.110.0060.01116.36
7.4.100.0090.01516.58
7.4.90.0030.01416.78
7.4.80.0130.00619.39
7.4.70.0050.01316.57
7.4.60.0060.01216.39
7.4.50.0000.00916.59
7.4.40.0080.01416.53
7.4.30.0070.01016.37
7.4.00.0120.00315.11
7.3.330.0020.00213.46
7.3.320.0050.00313.40
7.3.310.0030.00316.45
7.3.300.0070.00016.50
7.3.290.0090.00616.46
7.3.280.0080.01116.44
7.3.270.0100.01017.40
7.3.260.0070.01016.43
7.3.250.0100.00816.49
7.3.240.0140.00316.44
7.3.230.0090.00916.63
7.3.210.0100.01316.47
7.3.200.0070.01819.39
7.3.190.0100.01016.49
7.3.180.0180.00016.47
7.3.170.0060.01016.61
7.3.160.0070.01016.66
7.3.120.0050.00914.94
7.3.110.0080.01114.91
7.3.100.0070.01015.01
7.3.90.0050.01214.82
7.3.80.0050.01014.91
7.3.70.0060.00814.83
7.3.60.0030.00914.84
7.3.50.0060.00614.82
7.3.40.0020.01114.79
7.3.30.0060.00914.79
7.3.20.0080.00516.78
7.3.10.0080.00316.62
7.3.00.0070.00816.68
7.2.330.0070.01116.66
7.2.320.0070.01116.73
7.2.310.0120.00916.72
7.2.300.0110.01416.73
7.2.290.0090.01616.52
7.2.250.0100.01014.90
7.2.240.0020.01515.20
7.2.230.0050.01215.26
7.2.220.0070.00614.92
7.2.210.0060.00815.14
7.2.200.0090.00615.20
7.2.190.0040.00915.18
7.2.180.0080.00615.17
7.2.170.0090.00815.14
7.2.160.0070.00815.16
7.2.150.0010.01016.99
7.2.140.0060.00616.75
7.2.130.0040.01516.73
7.2.120.0030.00816.92
7.2.110.0100.00916.98
7.2.100.0070.01017.03
7.2.90.0030.01116.88
7.2.80.0060.00616.97
7.2.70.0060.01116.67
7.2.60.0040.01116.87
7.2.50.0110.00517.01
7.2.40.0090.00517.11
7.2.30.0100.00616.97
7.2.20.0050.00817.04
7.2.10.0070.00616.96
7.2.00.0050.01116.92
7.1.330.0070.00915.69
7.1.320.0090.00315.90
7.1.310.0040.00715.67
7.1.300.0100.00315.80
7.1.290.0050.00715.74
7.1.280.0060.00815.80
7.1.270.0010.01315.62
7.1.260.0050.00915.71
7.1.250.0060.00715.72
7.1.240.0100.01016.01
7.1.230.0030.01015.79
7.1.220.0060.00815.82
7.1.210.0070.00715.91
7.1.200.0080.00615.89
7.1.190.0040.00415.93
7.1.180.0030.01015.73
7.1.170.0060.01215.73
7.1.160.0100.00315.68
7.1.150.0080.00815.79
7.1.140.0000.01315.81
7.1.130.0000.01515.72
7.1.120.0070.00715.71
7.1.110.0040.00815.53
7.1.100.0020.01416.62
7.1.90.0060.00615.82
7.1.80.0040.00715.75
7.1.70.0080.00316.48
7.1.60.0050.01517.73
7.1.50.0050.00916.29
7.1.40.0090.00315.83
7.1.30.0110.00415.81
7.1.20.0000.01215.40
7.1.10.0030.01215.72
7.1.00.0050.04119.12
7.0.330.0040.01115.57
7.0.320.0040.00715.37
7.0.310.0080.00315.42
7.0.300.0060.01215.45
7.0.290.0070.00715.34
7.0.280.0100.00315.45
7.0.270.0030.01015.45
7.0.260.0080.00515.38
7.0.250.0100.00315.34
7.0.240.0030.00615.45
7.0.230.0090.00315.38
7.0.220.0040.00815.34
7.0.210.0080.00615.38
7.0.200.0030.00816.15
7.0.190.0040.01115.33
7.0.180.0070.00715.52
7.0.170.0030.00915.40
7.0.160.0060.00915.29
7.0.150.0100.00315.23
7.0.140.0030.04318.65
7.0.130.0150.00015.59
7.0.120.0030.00915.51
7.0.110.0030.01015.27
7.0.100.0060.00615.58
7.0.90.0000.01115.34
7.0.80.0080.00415.45
7.0.70.0070.01115.34
7.0.60.0060.04617.56
7.0.50.0120.01816.64
7.0.40.0030.02716.67
7.0.30.0370.03016.79
7.0.20.0160.03016.64
7.0.10.0130.02316.81
7.0.00.0080.04016.86
5.6.400.0040.01114.46
5.6.390.0030.01014.41
5.6.380.0060.00314.56
5.6.370.0090.00614.52
5.6.360.0060.00614.54
5.6.350.0070.01114.15
5.6.340.0000.01514.44
5.6.330.0060.00914.33
5.6.320.0030.01014.37
5.6.310.0090.00614.10
5.6.300.0030.00914.13
5.6.290.0000.01514.30
5.6.280.0090.03717.68
5.6.270.0000.01414.27
5.6.260.0030.01414.29
5.6.250.0060.00614.26
5.6.240.0060.00914.11
5.6.230.0000.01514.32
5.6.220.0030.01014.26
5.6.210.0050.02517.55
5.6.200.0100.04316.17
5.6.190.0190.03517.35
5.6.180.1980.02517.39
5.6.170.0190.04317.42
5.6.160.0180.02817.52
5.6.150.0070.02316.29
5.6.140.0050.04416.21
5.6.130.0050.02516.16
5.6.120.0070.03717.61
5.6.110.0030.02517.78
5.6.100.0070.04517.82
5.6.90.0040.02617.84
5.6.80.0080.04217.28
5.6.70.0000.03617.22
5.6.60.0100.00314.40
5.6.50.0100.00014.33
5.6.40.0100.00714.46
5.6.30.0060.00614.27
5.6.20.0120.00014.16
5.6.10.0000.00814.19
5.6.00.0030.01114.16
5.5.380.0080.00813.98
5.5.370.0070.01114.22
5.5.360.0040.01114.39
5.5.350.0130.04417.37
5.5.340.0100.02816.21
5.5.330.0080.04217.29
5.5.320.0260.04117.34
5.5.310.0130.02717.28
5.5.300.0050.03016.01
5.5.290.0040.04616.08
5.5.280.0030.03317.35
5.5.270.0050.02317.41
5.5.260.0090.03617.60
5.5.250.0160.02717.50
5.5.240.0020.02717.13
5.5.230.0040.01114.49
5.5.220.0060.00614.22
5.5.210.0070.00414.34
5.5.200.0060.00913.94
5.5.190.0100.00314.29
5.5.180.0090.00613.98
5.5.170.0070.00714.27
5.5.160.0080.00313.96
5.5.150.0070.00714.17
5.5.140.0000.00814.10
5.5.130.0040.00814.30
5.5.120.0000.01013.80
5.5.110.0060.00914.38
5.5.100.0030.00614.20
5.5.90.0070.01114.11
5.5.80.0060.00614.16
5.5.70.0070.01114.08
5.5.60.0000.01014.03
5.5.50.0060.00613.91
5.5.40.0030.01014.32
5.5.30.0030.01014.57
5.5.20.0040.01114.30
5.5.10.0100.00614.22
5.5.00.0040.01114.11
5.4.450.0460.03716.09
5.4.440.0510.03316.17
5.4.430.0100.03616.18
5.4.420.0360.00316.07
5.4.410.0130.02515.84
5.4.400.0190.03315.77
5.4.390.0150.03315.65
5.4.380.0080.03115.66
5.4.370.0040.02515.76
5.4.360.0080.02015.76
5.4.350.0040.02012.38
5.4.340.0060.02112.38
5.4.330.0030.00912.72
5.4.320.0040.02112.62
5.4.310.0040.02312.62
5.4.300.0020.02612.62
5.4.290.0120.02712.62
5.4.280.0110.03612.56
5.4.270.0130.04012.57
5.4.260.0070.02812.57
5.4.250.0080.02912.56
5.4.240.0090.04812.56
5.4.230.0070.04012.56
5.4.220.0050.03512.56
5.4.210.0090.02812.56
5.4.200.0140.03612.56
5.4.190.0100.04112.56
5.4.180.0070.03212.56
5.4.170.0040.03212.56
5.4.160.0070.03312.56
5.4.150.0070.02812.56
5.4.140.0070.03112.40
5.4.130.0130.04312.40
5.4.120.0200.05112.38
5.4.110.0110.05812.37
5.4.100.0090.02812.37
5.4.90.0090.02812.37
5.4.80.0060.02912.37
5.4.70.0060.02712.37
5.4.60.0060.02812.37
5.4.50.0080.02812.37
5.4.40.0060.02412.37
5.4.30.0080.02412.36
5.4.20.0080.02612.36
5.4.10.0070.02812.36
5.4.00.0060.02812.11
5.3.290.0040.03212.76
5.3.280.0030.02712.71
5.3.270.0070.02912.72
5.3.260.0110.05512.72
5.3.250.0080.03812.72
5.3.240.0050.03112.72
5.3.230.0080.03612.71
5.3.220.0080.03012.70
5.3.210.0090.04112.70
5.3.200.0040.03312.70
5.3.190.0050.03112.70
5.3.180.0050.03212.70
5.3.170.0070.02912.70
5.3.160.0070.03512.70
5.3.150.0120.05212.70
5.3.140.0080.03012.69
5.3.130.0080.03112.69
5.3.120.0100.03012.69
5.3.110.0080.03412.69
5.3.100.0050.03212.43
5.3.90.0040.03212.41
5.3.80.0070.02312.41
5.3.70.0090.03512.41
5.3.60.0080.02212.40
5.3.50.0050.02712.38
5.3.40.0060.02412.38
5.3.30.0040.02812.36
5.3.20.0060.02512.25
5.3.10.0090.02012.23
5.3.00.0070.02312.23
5.2.170.0050.0419.23
5.2.160.0050.0389.23
5.2.150.0040.0369.23
5.2.140.0070.0439.23
5.2.130.0020.0469.19
5.2.120.0050.0429.19
5.2.110.0070.0439.20
5.2.100.0060.0419.20
5.2.90.0070.0479.20
5.2.80.0070.0639.19
5.2.70.0090.0509.19
5.2.60.0070.0429.14
5.2.50.0050.0329.11
5.2.40.0090.0309.08
5.2.30.0060.0289.06
5.2.20.0090.0479.04
5.2.10.0060.0638.95
5.2.00.0110.0558.82
5.1.60.0130.0678.10
5.1.50.0090.0408.10
5.1.40.0070.0438.08
5.1.30.0060.0428.43
5.1.20.0100.0618.45
5.1.10.0090.0508.17
5.1.00.0100.0518.17
5.0.50.0060.0386.65
5.0.40.0060.0316.52
5.0.30.0030.0466.32
5.0.20.0040.0286.30
5.0.10.0050.0286.27
5.0.00.0040.0526.26
4.4.90.0020.0184.78
4.4.80.0030.0164.75
4.4.70.0070.0144.76
4.4.60.0060.0174.76
4.4.50.0030.0164.77
4.4.40.0050.0314.71
4.4.30.0070.0374.76
4.4.20.0040.0234.84
4.4.10.0050.0234.85
4.4.00.0040.0334.76
4.3.110.0050.0144.67
4.3.100.0030.0234.66
4.3.90.0030.0214.64
4.3.80.0040.0314.58
4.3.70.0050.0184.63
4.3.60.0060.0134.63
4.3.50.0060.0174.63
4.3.40.0060.0354.54
4.3.30.0050.0213.31
4.3.20.0020.0293.28
4.3.10.0030.0153.25
4.3.00.0200.0176.63

preferences:
52.12 ms | 401 KiB | 5 Q