3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait DataCollector { static $collectionData = array(); static function setData( $data ) { self::$CollectionData[] = $data; } static function getCollectedData() { return self::$CollectionData; } } class Form {} class Field extends Form { use DataCollector; public function __construct( $type, $text = NULL ) { self::setData( $type ); } } $Field1 = new Field( 'text' ); var_dump( $Field1->getCollectedData() ); $Field2 = new Field( 'html', 'hello' ); var_dump( $Field2->getCollectedData() );

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.70.0100.01016.88
8.3.60.0100.00616.50
8.3.50.0250.00622.11
8.3.40.0090.00918.94
8.3.30.0070.00719.17
8.3.20.0040.00420.30
8.3.10.0080.00023.70
8.3.00.0050.00320.58
8.2.180.0150.00616.75
8.2.170.0150.00322.96
8.2.160.0100.00720.43
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0080.00022.08
8.2.110.0030.00622.14
8.2.100.0110.00017.78
8.2.90.0090.00019.06
8.2.80.0080.00018.03
8.2.70.0040.00417.50
8.2.60.0030.00617.92
8.2.50.0030.00618.07
8.2.40.0080.00019.34
8.2.30.0000.00817.98
8.2.20.0040.00417.62
8.2.10.0000.00819.53
8.2.00.0060.00317.81
8.1.280.0140.00325.92
8.1.270.0040.00423.91
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.82
8.1.230.0080.00318.97
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0040.00417.54
8.1.180.0050.00318.10
8.1.170.0060.00318.50
8.1.160.0040.00422.02
8.1.150.0000.00718.49
8.1.140.0070.00317.39
8.1.130.0030.00317.77
8.1.120.0000.00717.39
8.1.110.0040.00417.29
8.1.100.0000.00717.43
8.1.90.0040.00417.34
8.1.80.0030.00317.39
8.1.70.0020.00517.41
8.1.60.0000.00817.54
8.1.50.0040.00417.44
8.1.40.0030.00517.38
8.1.30.0000.00817.59
8.1.20.0060.00317.60
8.1.10.0030.00617.48
8.1.00.0060.00617.45
8.0.300.0040.00418.77
8.0.290.0070.00017.16
8.0.280.0030.00318.52
8.0.270.0050.00317.30
8.0.260.0030.00316.92
8.0.250.0030.00317.07
8.0.240.0000.00916.96
8.0.230.0030.00517.02
8.0.220.0000.00717.03
8.0.210.0000.00716.86
8.0.200.0060.00016.91
8.0.190.0040.00417.06
8.0.180.0080.00016.96
8.0.170.0000.00916.94
8.0.160.0000.00717.07
8.0.150.0030.00316.87
8.0.140.0000.00716.89
8.0.130.0060.00013.42
8.0.120.0000.00816.83
8.0.110.0040.00416.88
8.0.100.0040.00416.81
8.0.90.0090.00016.96
8.0.80.0080.00817.00
8.0.70.0000.00716.81
8.0.60.0040.00416.79
8.0.50.0040.00416.99
8.0.30.0120.00717.13
8.0.20.0130.00517.40
8.0.10.0030.00316.89
8.0.00.0100.01316.75
7.4.330.0020.00215.00
7.4.320.0030.00316.46
7.4.300.0000.00616.38
7.4.290.0000.00816.66
7.4.280.0030.00316.43
7.4.270.0040.00416.54
7.4.260.0040.00416.49
7.4.250.0030.00516.46
7.4.240.0030.00416.62
7.4.230.0040.00416.55
7.4.220.0140.01216.65
7.4.210.0060.00916.46
7.4.200.0030.00316.61
7.4.190.0030.00316.37
7.4.160.0120.00416.63
7.4.150.0140.00317.40
7.4.140.0130.00717.86
7.4.130.0100.00816.56
7.4.120.0110.00616.45
7.4.110.0090.00616.49
7.4.100.0120.00916.41
7.4.90.0030.01716.66
7.4.80.0120.00616.39
7.4.70.0030.01616.62
7.4.60.0040.01216.40
7.4.50.0050.00316.53
7.4.40.0120.00622.77
7.4.30.0180.00016.46
7.4.00.0100.00714.77
7.3.330.0050.00013.30
7.3.320.0050.00013.22
7.3.310.0040.00416.35
7.3.300.0000.00716.23
7.3.290.0000.01416.29
7.3.280.0050.01116.30
7.3.270.0100.00717.40
7.3.260.0140.00316.47
7.3.250.0150.00416.47
7.3.240.0090.00616.41
7.3.230.0140.00316.39
7.3.210.0060.01216.57
7.3.200.0090.01019.39
7.3.190.0070.01416.47
7.3.180.0120.00816.46
7.3.170.0140.00316.38
7.3.160.0060.01016.50
7.3.120.0070.00717.15
7.3.110.0040.01417.15
7.3.100.0000.00817.15
7.3.90.0060.01017.15
7.3.80.0030.01017.15
7.3.70.0070.00717.15
7.3.60.0030.01317.15
7.3.50.0030.01017.15
7.3.40.0100.00317.15
7.3.30.0070.00417.15
7.3.20.0110.00417.15
7.3.10.0060.00616.68
7.3.00.0110.00516.71
7.2.330.0100.00716.44
7.2.320.0100.00716.41
7.2.310.0070.01016.62
7.2.300.0150.00316.66
7.2.290.0100.00716.68
7.2.240.0030.00617.15
7.2.230.0040.01117.15
7.2.220.0000.00917.15
7.2.210.0070.00717.15
7.2.200.0040.01117.15
7.2.190.0000.01817.15
7.2.180.0070.00717.15
7.2.170.0110.00417.15
7.2.160.0090.00617.15
7.2.150.0070.01017.15
7.2.140.0000.01517.15
7.2.130.0070.00916.86
7.2.120.0060.01016.91
7.2.110.0060.01016.80
7.2.100.0090.00716.82
7.2.90.0090.00616.81
7.2.80.0050.01016.82
7.2.70.0110.00716.97
7.2.60.0050.01016.85
7.2.50.0100.00816.88
7.2.40.0080.00816.81
7.2.30.0100.00716.98
7.2.20.0060.01217.00
7.2.10.0110.00816.86
7.2.00.0100.00817.41
7.1.330.0030.00717.15
7.1.320.0110.00417.15
7.1.310.0090.00617.15
7.1.300.0000.01417.15
7.1.290.0030.01017.15
7.1.280.0030.01017.15
7.1.270.0030.01317.15
7.1.260.0030.01317.15
7.1.250.0040.01016.07
7.1.200.0120.00215.59
7.1.100.0070.00718.21
7.1.70.0000.00817.18
7.1.60.0130.01019.22
7.1.50.0030.01616.93
7.1.00.0030.07722.30
7.0.200.0000.00816.86
7.0.140.0030.07322.21
7.0.100.0270.07319.94
7.0.90.0100.08320.00
7.0.80.0070.08019.89
7.0.70.0300.07719.85
7.0.60.0030.05019.94
7.0.50.0230.05320.25
7.0.40.0130.07320.05
7.0.30.0030.08720.07
7.0.20.0100.08020.13
7.0.10.0070.08319.95
7.0.00.0070.07320.18
5.6.280.0000.07721.03
5.6.250.0000.06720.60
5.6.240.0070.07320.70
5.6.230.0200.07020.57
5.6.220.0030.07720.53
5.6.210.0170.07320.68
5.6.200.0130.04721.07
5.6.190.0030.06321.14
5.6.180.0230.07020.95
5.6.170.0200.06321.06
5.6.160.0070.06721.05
5.6.150.0230.07320.95
5.6.140.0170.07721.11
5.6.130.0070.08721.09
5.6.120.0130.04321.02
5.6.110.0000.08321.02
5.6.100.0000.08021.11
5.6.90.0070.08321.01
5.6.80.0000.07020.45
5.6.70.0000.09320.56
5.6.60.0170.06720.44
5.6.50.0130.07320.45
5.6.40.0100.07720.54
5.6.30.0000.08320.31
5.6.20.0070.04720.48
5.6.10.0170.06320.38
5.6.00.0100.07320.43
5.5.380.0030.06720.40
5.5.370.0030.08020.41
5.5.360.0000.08720.42
5.5.350.0100.08320.38
5.5.340.0070.07320.79
5.5.330.0130.07720.94
5.5.320.0200.07320.94
5.5.310.0100.04720.91
5.5.300.0070.08720.91
5.5.290.0130.07720.89
5.5.280.0070.08320.89
5.5.270.0030.07320.87
5.5.260.0170.06320.91
5.5.250.0000.09020.58
5.5.240.0070.06720.19
5.5.230.0100.06720.16
5.5.220.0030.05020.15
5.5.210.0100.07720.19
5.5.200.0100.07020.16
5.5.190.0270.03020.23
5.5.180.0100.08020.22
5.5.160.0100.04720.14
5.5.150.0100.08320.25
5.5.140.0100.04720.28
5.5.130.0000.06320.13
5.5.120.0030.08320.23
5.5.110.0070.07320.25
5.5.100.0030.05320.14
5.5.90.0030.06019.95
5.5.80.0200.06020.09
5.5.70.0100.04020.10
5.5.60.0030.05020.07
5.5.50.0030.07720.09
5.5.40.0100.06720.14
5.5.30.0070.07720.16
5.5.20.0030.07720.05
5.5.10.0000.08020.09
5.5.00.0100.07719.96
5.4.450.0100.06019.54
5.4.440.0100.07319.27
5.4.430.0200.06719.49
5.4.420.0070.08319.53
5.4.410.0070.06319.38
5.4.400.0130.07318.86
5.4.390.0030.06318.88
5.4.380.0100.07318.95
5.4.370.0070.06718.86
5.4.360.0100.06318.88
5.4.350.0030.07319.05
5.4.340.0130.06719.07
5.4.320.0100.03319.16
5.4.310.0100.06718.96
5.4.300.0000.07019.03
5.4.290.0130.07719.14
5.4.280.0030.07019.16
5.4.270.0100.07719.18
5.4.260.0170.06719.09
5.4.250.0030.08019.02
5.4.240.0100.07019.17
5.4.230.0030.07719.22
5.4.220.0100.07718.90
5.4.210.0100.08018.98
5.4.200.0100.07019.20
5.4.190.0030.07019.24
5.4.180.0100.07019.04
5.4.170.0000.08719.08
5.4.160.0100.06719.10
5.4.150.0030.08019.11
5.4.140.0030.07316.31
5.4.130.0070.05016.48
5.4.120.0100.03716.47
5.4.110.0100.07016.40
5.4.100.0070.07316.45
5.4.90.0130.05316.48
5.4.80.0100.05716.40
5.4.70.0070.04016.39
5.4.60.0030.06016.40
5.4.50.0270.06016.48
5.4.40.0100.05716.38
5.4.30.0070.07316.30
5.4.20.0100.05316.30
5.4.10.0100.07316.41
5.4.00.0130.06315.88
5.3.290.0130.05014.52
5.3.280.0130.06014.58
5.3.270.0030.08014.61
5.3.260.0100.07714.55
5.3.250.0130.06014.59
5.3.240.0030.07014.47
5.3.230.0070.07714.51
5.3.220.0030.07314.52
5.3.210.0030.07314.57
5.3.200.0100.06714.48
5.3.190.0170.05714.51
5.3.180.0030.07714.56
5.3.170.0130.07014.56
5.3.160.0030.05014.55
5.3.150.0000.08014.41
5.3.140.0100.07014.40
5.3.130.0070.06314.51
5.3.120.0030.07314.41
5.3.110.0030.08014.54
5.3.100.0030.05314.02
5.3.90.0130.06714.00
5.3.80.0030.07013.93
5.3.70.0030.03713.93
5.3.60.0070.03313.86
5.3.50.0070.03313.80
5.3.40.0030.06313.72
5.3.30.0000.04013.88
5.3.20.0070.05313.55
5.3.10.0070.04013.52
5.3.00.0000.03713.57
5.2.170.0000.03311.13
5.2.160.0100.05311.13
5.2.150.0030.03011.14
5.2.140.0030.03011.12
5.2.130.0000.03010.96
5.2.120.0000.02711.17
5.2.110.0000.03011.06
5.2.100.0070.02310.89
5.2.90.0030.02710.96
5.2.80.0000.03011.05
5.2.70.0070.02311.08
5.2.60.0070.02711.09
5.2.50.0000.03310.81
5.2.40.0000.03010.99
5.2.30.0000.05310.98
5.2.20.0100.05310.75
5.2.10.0000.06010.79
5.2.00.0000.03010.77
5.1.60.0070.05310.07
5.1.50.0070.04010.04
5.1.40.0070.03310.05
5.1.30.0070.02310.20
5.1.20.0000.02710.36
5.1.10.0030.03710.15
5.1.00.0030.04310.15
5.0.50.0030.0208.60
5.0.40.0000.0238.39
5.0.30.0000.0378.26
5.0.20.0000.0208.28
5.0.10.0000.0478.16
5.0.00.0030.0438.27
4.4.90.0000.0177.80
4.4.80.0000.0177.80
4.4.70.0000.0337.80
4.4.60.0070.0277.80
4.4.50.0000.0277.80
4.4.40.0000.0537.80
4.4.30.0030.0307.80
4.4.20.0000.0177.80
4.4.10.0030.0207.80
4.4.00.0000.0377.80
4.3.110.0000.0237.80
4.3.100.0030.0107.80
4.3.90.0000.0337.80
4.3.80.0000.0277.80
4.3.70.0030.0137.80
4.3.60.0070.0277.80
4.3.50.0000.0177.80
4.3.40.0030.0177.80
4.3.30.0030.0137.80
4.3.20.0000.0177.80
4.3.10.0000.0277.80
4.3.00.0000.0177.80

preferences:
41.73 ms | 401 KiB | 5 Q