3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $a = array(); function getA() { return $this->a; } } $byReflection = (new ReflectionClass('Test'))->newInstanceWithoutConstructor(); $bySerialization = unserialize('O:4:"Test":0:{}'); $bySerializationWithProperty = unserialize(sprintf('O:4:"Test":1:{%s%s}', serialize("\0*\0a"), serialize(array()))); var_dump($byReflection); var_dump($bySerialization); var_dump($bySerializationWithProperty);

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.00716.49
8.3.50.0150.00522.10
8.3.40.0150.00018.51
8.3.30.0110.00418.63
8.3.20.0040.00420.36
8.3.10.0040.00423.69
8.3.00.0040.00418.99
8.2.180.0130.00916.63
8.2.170.0030.01022.96
8.2.160.0120.00320.45
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00420.98
8.2.110.0040.00420.94
8.2.100.0070.00417.84
8.2.90.0080.00017.72
8.2.80.0030.00517.97
8.2.70.0090.00017.50
8.2.60.0050.00517.80
8.2.50.0000.00918.07
8.2.40.0040.00419.70
8.2.30.0040.00418.25
8.2.20.0000.00717.59
8.2.10.0040.00418.01
8.2.00.0050.00217.73
8.1.280.0080.00625.92
8.1.270.0050.00323.79
8.1.260.0080.00026.35
8.1.250.0110.00728.09
8.1.240.0090.00320.69
8.1.230.0000.01220.84
8.1.220.0060.00317.74
8.1.210.0040.00418.89
8.1.200.0100.00017.22
8.1.190.0000.00817.23
8.1.180.0090.00018.10
8.1.170.0040.00418.52
8.1.160.0050.00321.97
8.1.150.0000.00718.69
8.1.140.0050.00217.29
8.1.130.0030.00317.73
8.1.120.0080.00017.39
8.1.110.0050.00217.38
8.1.100.0030.00317.29
8.1.90.0040.00417.28
8.1.80.0040.00317.44
8.1.70.0030.00317.39
8.1.60.0040.00417.51
8.1.50.0090.00017.46
8.1.40.0000.00717.47
8.1.30.0000.00817.60
8.1.20.0090.00017.60
8.1.10.0000.00717.49
8.1.00.0030.00617.34
8.0.300.0000.00919.96
8.0.290.0070.00017.05
8.0.280.0070.00018.42
8.0.270.0000.00717.20
8.0.260.0000.00617.27
8.0.250.0000.00716.87
8.0.240.0000.00716.82
8.0.230.0030.00616.83
8.0.220.0030.00316.79
8.0.210.0000.00716.79
8.0.200.0000.00616.93
8.0.190.0030.00516.83
8.0.180.0090.00016.92
8.0.170.0070.00016.94
8.0.160.0000.00716.83
8.0.150.0040.00416.83
8.0.140.0030.00616.84
8.0.130.0000.00513.36
8.0.120.0050.00316.91
8.0.110.0050.00316.86
8.0.100.0030.00516.88
8.0.90.0070.00016.99
8.0.80.0060.00916.93
8.0.70.0000.00716.81
8.0.60.0000.00716.73
8.0.50.0000.00716.92
8.0.30.0140.00516.79
8.0.20.0100.01317.40
8.0.10.0000.00716.86
8.0.00.0130.00416.67
7.4.330.0050.00015.06
7.4.320.0030.00316.53
7.4.300.0040.00416.53
7.4.290.0000.00716.55
7.4.280.0040.00416.54
7.4.270.0080.00016.55
7.4.260.0040.00416.43
7.4.250.0040.00416.51
7.4.240.0030.00316.49
7.4.230.0000.00716.57
7.4.220.0230.01416.55
7.4.210.0060.01116.53
7.4.200.0000.00716.54
7.4.190.0080.00016.59
7.4.160.0080.00816.66
7.4.150.0120.00617.40
7.4.140.0070.01117.86
7.4.130.0060.01316.47
7.4.120.0070.01216.48
7.4.110.0090.00916.44
7.4.100.0130.00916.39
7.4.90.0080.00816.30
7.4.80.0070.01019.39
7.4.70.0130.01016.49
7.4.60.0100.00716.24
7.4.50.0020.00216.38
7.4.40.0090.01216.55
7.4.30.0110.01016.60
7.4.10.0040.01415.00
7.4.00.0130.00514.88
7.3.330.0000.00613.27
7.3.320.0050.00013.06
7.3.310.0030.00316.07
7.3.300.0040.00416.12
7.3.290.0030.01016.22
7.3.280.0090.00816.16
7.3.270.0090.00817.40
7.3.260.0140.00416.26
7.3.250.0140.00516.38
7.3.240.0040.01716.25
7.3.230.0080.00816.39
7.3.210.0090.01616.24
7.3.200.0140.01019.39
7.3.190.0090.01516.32
7.3.180.0150.00416.23
7.3.170.0030.01316.40
7.3.160.0070.01016.35
7.3.130.0070.01014.55
7.3.120.0060.00914.75
7.3.110.0040.01214.25
7.3.100.0030.01014.86
7.3.90.0100.00614.84
7.3.80.0110.00614.57
7.3.70.0100.00314.68
7.3.60.0030.00614.81
7.3.50.0040.00814.57
7.3.40.0040.01414.69
7.3.30.0080.00414.77
7.3.20.0100.00316.39
7.3.10.0060.01016.67
7.3.00.0110.00716.25
7.2.330.0130.00616.62
7.2.320.0110.00916.48
7.2.310.0080.01116.39
7.2.300.0060.01116.20
7.2.290.0060.01216.62
7.2.260.0110.00314.54
7.2.250.0030.01415.06
7.2.240.0070.00715.18
7.2.230.0090.00914.89
7.2.220.0030.00714.73
7.2.210.0090.00315.04
7.2.200.0100.01015.01
7.2.190.0110.00714.99
7.2.180.0060.00614.96
7.2.170.0030.01314.90
7.2.160.0000.01514.73
7.2.150.0030.00616.81
7.2.140.0100.01016.74
7.2.130.0120.00316.86
7.2.120.0040.01416.79
7.2.110.0060.00916.96
7.2.100.0080.00816.86
7.2.90.0130.00016.92
7.2.80.0080.00416.76
7.2.70.0070.01016.66
7.2.60.0110.00716.72
7.2.50.0080.00416.73
7.2.40.0040.00716.75
7.2.30.0060.01016.68
7.2.20.0060.01216.80
7.2.10.0030.01016.43
7.2.00.0030.01018.12
7.1.330.0030.01015.71
7.1.320.0090.00615.80
7.1.310.0100.00315.44
7.1.300.0070.00715.53
7.1.290.0000.01715.68
7.1.280.0040.01115.62
7.1.270.0100.00715.81
7.1.260.0070.01015.71
7.1.250.0040.01215.76
7.1.240.0100.00315.53
7.1.230.0120.00615.83
7.1.220.0130.00315.60
7.1.210.0070.00715.54
7.1.200.0020.01115.77
7.1.190.0000.01215.59
7.1.180.0030.00615.68
7.1.170.0000.01015.79
7.1.160.0000.01315.89
7.1.150.0000.01215.93
7.1.140.0100.00315.45
7.1.130.0030.00915.89
7.1.120.0030.01015.70
7.1.110.0090.00615.83
7.1.100.0040.00517.06
7.1.90.0030.00615.40
7.1.80.0030.01015.95
7.1.70.0030.01016.52
7.1.60.0080.00817.45
7.1.50.0150.01025.14
7.1.40.0030.01215.71
7.1.30.0000.00915.63
7.1.20.0060.00615.83
7.1.10.0030.01015.71
7.1.00.0100.03519.00
7.0.330.0030.01015.44
7.0.320.0130.00615.41
7.0.310.0000.01415.40
7.0.300.0030.00915.46
7.0.290.0000.00915.38
7.0.280.0040.00815.48
7.0.270.0110.00415.19
7.0.260.0060.00915.45
7.0.250.0110.00315.26
7.0.240.0060.00315.37
7.0.230.0060.00315.25
7.0.220.0100.00315.49
7.0.210.0000.00815.34
7.0.200.0020.00715.94
7.0.190.0000.00815.18
7.0.180.0000.00815.62
7.0.170.0080.00615.50
7.0.160.0000.01315.41
7.0.150.0040.00415.45
7.0.140.0030.03818.69
7.0.130.0070.00815.34
7.0.120.0080.00315.47
7.0.110.0080.04317.75
7.0.100.0070.03817.72
7.0.90.0090.04417.75
7.0.80.0030.02417.65
7.0.70.0020.02517.60
7.0.60.0020.02617.70
7.0.50.0100.02017.89
7.0.40.0030.03516.71
7.0.30.0110.03816.74
7.0.20.0030.03016.65
7.0.10.0030.02616.77
7.0.00.0050.02516.84
5.6.400.0000.01614.24
5.6.390.0080.00014.25
5.6.380.0040.01514.36
5.6.370.0030.01314.27
5.6.360.0030.01014.24
5.6.350.0030.01014.29
5.6.340.0030.01014.09
5.6.330.0070.00314.50
5.6.320.0060.00614.19
5.6.310.0040.00414.32
5.6.300.0030.01014.24
5.6.290.0090.00914.52
5.6.280.0050.04017.64
5.6.270.0040.01214.46
5.6.260.0070.04217.63
5.6.250.0090.03917.46
5.6.240.0040.03117.50
5.6.230.0020.02717.44
5.6.220.0070.02817.62
5.6.210.0040.02417.54
5.6.200.0070.02417.71
5.6.190.0050.02417.61
5.6.180.0020.02817.67
5.6.170.0080.03317.81
5.6.160.0040.02417.66
5.6.150.0070.03217.71
5.6.140.0090.02217.63
5.6.130.0110.02117.79
5.6.120.0080.02317.87
5.6.110.0100.03617.70
5.6.100.0080.02117.69
5.6.90.0030.02717.72
5.6.80.0050.02517.33
5.6.70.0070.02417.40
5.6.60.0150.01717.20
5.6.50.0050.02717.29
5.6.40.0060.03517.39
5.6.30.0020.02817.15
5.6.20.0050.02717.35
5.6.10.0050.02417.36
5.6.00.0050.02317.34
5.5.380.0070.02817.34
5.5.370.0020.02717.36
5.5.360.0040.02617.22
5.5.350.0020.02717.38
5.5.340.0030.02317.57
5.5.330.0060.02117.44
5.5.320.0020.02817.46
5.5.310.0130.01817.43
5.5.300.0030.02517.65
5.5.290.0050.03017.65
5.5.280.0050.02817.60
5.5.270.0080.02117.55
5.5.260.0070.02317.57
5.5.250.0030.03717.40
5.5.240.0070.02217.16
5.5.230.0030.02517.19
5.5.220.0100.02017.08
5.5.210.0030.02717.31
5.5.200.0020.02817.28
5.5.190.0060.02417.38
5.5.180.0050.02317.30
5.5.170.0050.00514.24
5.5.160.0070.02317.05
5.5.150.0050.02117.21
5.5.140.0030.04817.00
5.5.130.0070.04317.17
5.5.120.0030.04517.04
5.5.110.0050.03217.26
5.5.100.0050.04516.98
5.5.90.0070.04417.01
5.5.80.0050.04516.98
5.5.70.0090.03917.18
5.5.60.0120.03216.99
5.5.50.0080.04316.98
5.5.40.0050.04517.01
5.5.30.0100.04317.20
5.5.20.0050.03117.28
5.5.10.0070.04217.23
5.5.00.0060.02817.18
5.4.450.0050.02515.64
5.4.440.0030.02315.49
5.4.430.0050.02015.59
5.4.420.0020.02615.49
5.4.410.0000.02615.54
5.4.400.0050.02015.40
5.4.390.0030.02215.40
5.4.380.0040.02015.33
5.4.370.0070.02015.40
5.4.360.0030.02415.33
5.4.350.0040.02715.30
5.4.340.0030.02015.41
5.4.330.0030.01011.64
5.4.320.0020.02515.31
5.4.310.0020.02315.32
5.4.300.0050.02915.29
5.4.290.0020.04315.44
5.4.280.0060.04415.32
5.4.270.0100.03515.43
5.4.260.0030.04015.32
5.4.250.0110.02615.32
5.4.240.0020.04615.32
5.4.230.0050.04515.31
5.4.220.0040.04515.41
5.4.210.0030.04415.32
5.4.200.0050.04015.32
5.4.190.0050.04015.33
5.4.180.0050.03315.41
5.4.170.0030.04015.31
5.4.160.0030.02815.30
5.4.150.0050.04015.40
5.4.140.0030.04014.00
5.4.130.0010.03614.09
5.4.120.0050.03714.05
5.4.110.0120.03514.01
5.4.100.0060.03814.03
5.4.90.0050.03514.03
5.4.80.0110.03514.14
5.4.70.0060.03414.09
5.4.60.0050.03314.08
5.4.50.0070.03814.09
5.4.40.0090.02214.05
5.4.30.0070.03814.01
5.4.20.0070.03914.06
5.4.10.0080.04213.99
5.4.00.0020.04013.72
5.3.290.0050.02213.23
5.3.280.0050.04113.23
5.3.270.0020.04313.13
5.3.260.0050.03913.12
5.3.250.0070.03013.17
5.3.240.0080.03813.17
5.3.230.0050.03813.13
5.3.220.0080.03613.18
5.3.210.0030.04313.13
5.3.200.0080.03713.17
5.3.190.0070.03713.18
5.3.180.0050.03813.09
5.3.170.0100.03613.09
5.3.160.0070.03513.12
5.3.150.0080.04013.09
5.3.140.0070.04013.16
5.3.130.0070.03413.10
5.3.120.0050.03613.10
5.3.110.0020.03313.14
5.3.100.0030.04312.77
5.3.90.0020.04112.76
5.3.80.0080.03312.86
5.3.70.0020.04112.95
5.3.60.0050.02512.86
5.3.50.0070.03312.80
5.3.40.0090.03312.91
5.3.30.0030.04012.78
5.3.20.0090.02012.78
5.3.10.0100.04012.58
5.3.00.0100.03312.67
5.2.170.0130.05011.86
5.2.160.0030.06311.86
5.2.150.0070.05711.86
5.2.140.0000.05711.86
5.2.130.0070.05311.86
5.2.120.0100.05311.86
5.2.110.0100.05711.86
5.2.100.0000.05711.86
5.2.90.0130.05011.86
5.2.80.0070.05011.86
5.2.70.0100.03311.86
5.2.60.0170.04711.86
5.2.50.0030.06311.86
5.2.40.0070.05711.86
5.2.30.0070.05711.86
5.2.20.0030.06011.86
5.2.10.0030.03711.86
5.2.00.0070.05711.86
5.1.60.0030.05311.86
5.1.50.0070.05011.86
5.1.40.0030.05311.86
5.1.30.0070.05011.86
5.1.20.0070.05011.86
5.1.10.0100.05311.86
5.1.00.0070.05011.86
5.0.50.0070.04011.86
5.0.40.0100.03711.86
5.0.30.0130.04011.86
5.0.20.0070.04011.86
5.0.10.0070.03311.86
5.0.00.0000.06711.86
4.4.90.0000.04011.86
4.4.80.0100.02711.86
4.4.70.0030.02311.86
4.4.60.0000.02311.86
4.4.50.0100.02711.86
4.4.40.0000.05711.86
4.4.30.0030.03311.86
4.4.20.0070.01711.86
4.4.10.0030.03311.86
4.4.00.0100.04311.86
4.3.110.0030.03011.86
4.3.100.0070.02711.86
4.3.90.0030.03311.86
4.3.80.0000.03011.86
4.3.70.0030.03311.86
4.3.60.0000.03711.86
4.3.50.0070.03011.86
4.3.40.0070.04311.86
4.3.30.0030.02711.86
4.3.20.0000.02711.86
4.3.10.0000.05011.86
4.3.00.0000.03311.86

preferences:
38.24 ms | 401 KiB | 5 Q