3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait DataCollector { private static $CollectionData; public static function setData( $data ) { if (!isset(self::$CollectionData)) self::$CollectionData = array(); self::$CollectionData[] = $data; var_dump(self::$CollectionData); } private static function getCollectedData() { return self::$CollectionData; } } trait dataHandler { use DataCollector { getCollectedData as public; } } class Form { use DataCollector {} } class Field extends Form { public function __construct( $type, $text = NULL ) { self::setData( $type ); } } $Field1 = new Field( 'text' ); $Field2 = new Field( 'html' ); var_dump( 'Collected Data', Form::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.60.0070.01416.59
8.3.50.0100.01217.46
8.3.40.0070.00718.92
8.3.30.0080.00818.98
8.3.20.0090.00918.95
8.3.10.0060.00320.66
8.3.00.0040.00419.38
8.2.180.0040.01416.75
8.2.170.0140.00718.91
8.2.160.0170.00022.96
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00318.09
8.2.110.0030.00621.00
8.2.100.0080.00317.97
8.2.90.0040.00719.30
8.2.80.0040.00418.03
8.2.70.0080.00017.63
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0060.00318.28
8.2.30.0050.00318.14
8.2.20.0050.00217.85
8.2.10.0090.00017.82
8.2.00.0000.00717.88
8.1.280.0130.00625.92
8.1.270.0000.00723.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00020.88
8.1.230.0070.00421.04
8.1.220.0000.00817.79
8.1.210.0040.00418.93
8.1.200.0000.01117.48
8.1.190.0030.00617.53
8.1.180.0030.00518.10
8.1.170.0030.00618.71
8.1.160.0020.00518.94
8.1.150.0060.00318.70
8.1.140.0070.00017.47
8.1.130.0000.00717.84
8.1.120.0040.00417.44
8.1.110.0000.00817.48
8.1.100.0000.00717.34
8.1.90.0000.00717.36
8.1.80.0070.00017.36
8.1.70.0070.00017.43
8.1.60.0000.00717.49
8.1.50.0040.00417.38
8.1.40.0080.00017.56
8.1.30.0040.00417.62
8.1.20.0000.00817.51
8.1.10.0040.00417.60
8.1.00.0000.00817.49
8.0.300.0040.00419.98
8.0.290.0040.00416.75
8.0.280.0040.00418.52
8.0.270.0040.00417.19
8.0.260.0000.00716.91
8.0.250.0060.00316.94
8.0.240.0110.00017.00
8.0.230.0040.00416.93
8.0.220.0070.00017.04
8.0.210.0070.00016.90
8.0.200.0060.00016.91
8.0.190.0040.00416.99
8.0.180.0000.00717.06
8.0.170.0040.00416.88
8.0.160.0000.00716.93
8.0.150.0040.00417.00
8.0.140.0070.00016.79
8.0.130.0000.00813.44
8.0.120.0050.00316.90
8.0.110.0030.00316.83
8.0.100.0030.00616.77
8.0.90.0070.00016.81
8.0.80.0090.00616.91
8.0.70.0040.00416.82
8.0.60.0030.00516.95
8.0.50.0000.00716.93
8.0.30.0140.00517.10
8.0.20.0090.01416.95
8.0.10.0040.00416.91
8.0.00.0110.00816.91
7.4.330.0020.00213.00
7.4.320.0040.00416.54
7.4.300.0000.00716.54
7.4.290.0040.00416.57
7.4.280.0000.00916.44
7.4.270.0030.00316.42
7.4.260.0000.00613.22
7.4.250.0060.00316.57
7.4.240.0040.00416.54
7.4.230.0000.00716.64
7.4.220.0150.00016.48
7.4.210.0070.01016.55
7.4.200.0040.00416.42
7.4.190.0050.00316.43
7.4.160.0100.00616.70
7.4.150.0090.00916.62
7.4.140.0080.01616.63
7.4.130.0100.01016.58
7.4.120.0060.01216.49
7.4.110.0170.00016.55
7.4.100.0070.01016.59
7.4.90.0120.00816.57
7.4.80.0100.00716.67
7.4.70.0030.01716.56
7.4.60.0100.00716.49
7.4.50.0050.00216.47
7.4.40.0030.00716.37
7.4.30.0170.00016.59
7.4.00.0030.01414.98
7.3.330.0000.00713.32
7.3.320.0030.00313.32
7.3.310.0000.00716.23
7.3.300.0070.00016.36
7.3.290.0060.00816.35
7.3.280.0130.00416.37
7.3.270.0140.01016.55
7.3.260.0120.00616.55
7.3.250.0130.00916.39
7.3.240.0110.00616.58
7.3.230.0080.01416.47
7.3.210.0060.01616.54
7.3.200.0060.01119.39
7.3.190.0080.01116.55
7.3.180.0160.00016.43
7.3.170.0060.01516.37
7.3.160.0130.00616.48
7.3.120.0070.01014.83
7.3.110.0100.00714.74
7.3.100.0150.00014.71
7.3.90.0150.00014.60
7.3.80.0000.01414.66
7.3.70.0050.00514.59
7.3.60.0070.01014.97
7.3.50.0120.00314.99
7.3.40.0040.01414.77
7.3.30.0060.00914.88
7.3.20.0030.01016.56
7.3.10.0070.01116.78
7.3.00.0030.01016.76
7.2.330.0160.00316.37
7.2.320.0090.00916.53
7.2.310.0100.01516.70
7.2.300.0110.00616.79
7.2.290.0090.01116.60
7.2.240.0110.00415.08
7.2.230.0080.00815.10
7.2.220.0040.00815.30
7.2.210.0040.01214.99
7.2.200.0110.00715.21
7.2.190.0060.00914.99
7.2.180.0090.00915.09
7.2.170.0030.01015.04
7.2.160.0100.00314.86
7.2.150.0000.01816.97
7.2.140.0040.01116.77
7.2.130.0120.00616.95
7.2.120.0070.00716.87
7.2.110.0060.00617.08
7.2.100.0030.01216.88
7.2.90.0060.00916.96
7.2.80.0040.00816.90
7.2.70.0070.01117.05
7.2.60.0060.00816.88
7.2.50.0000.01116.72
7.2.40.0120.00616.94
7.2.30.0000.01316.95
7.2.20.0030.01616.84
7.2.10.0060.01016.89
7.2.00.0100.00716.93
7.1.330.0060.00315.83
7.1.320.0080.00815.51
7.1.310.0000.01515.89
7.1.300.0100.00015.82
7.1.290.0080.00815.90
7.1.280.0080.00615.76
7.1.270.0140.00015.46
7.1.260.0030.01315.72
7.1.250.0070.00715.47
7.1.200.0050.00215.87
7.1.100.0120.00018.17
7.1.70.0000.01017.20
7.1.60.0090.00619.40
7.1.50.0090.01216.82
7.1.00.0030.06022.24
7.0.200.0000.00816.89
7.0.140.0070.07022.15
7.0.120.0070.06021.96
7.0.60.0300.07320.11
7.0.50.0100.06717.89
7.0.40.0070.04720.17
7.0.30.0470.05720.36
7.0.20.0130.05020.05
7.0.10.0130.03720.23
7.0.00.0070.09020.22
5.6.280.0000.07721.07
5.6.210.0100.07720.73
5.6.200.0130.06018.14
5.6.190.0030.10320.77
5.6.180.0230.07020.42
5.6.170.0300.05720.57
5.6.160.0100.04720.52
5.6.150.0100.07718.21
5.6.140.0130.04318.17
5.6.130.0030.06718.18
5.6.120.0030.09020.98
5.6.110.0170.07320.97
5.6.100.0170.07321.11
5.6.90.0170.07720.96
5.6.80.0230.07020.36
5.5.350.0200.07720.43
5.5.340.0070.05318.04
5.5.330.0070.08320.57
5.5.320.0200.04320.24
5.5.310.0430.07020.34
5.5.300.0100.04717.95
5.5.290.0070.07318.03
5.5.280.0000.04320.88
5.5.270.0170.08320.68
5.5.260.0130.04320.65
5.5.250.0100.03720.78
5.5.240.0070.03720.27
5.4.450.0030.04019.33
5.4.440.0100.03319.40
5.4.430.0030.04019.48
5.4.420.0070.04019.40
5.4.410.0100.03719.44
5.4.400.0100.03019.21
5.4.390.0070.03319.24
5.4.380.0030.03719.13
5.4.370.0000.04018.84
5.4.360.0070.05719.24
5.4.350.0000.04318.85
5.4.340.0100.07019.15
5.4.320.0100.04018.86
5.4.310.0030.07719.24
5.4.300.0100.07719.15
5.4.290.0070.05019.11
5.4.280.0100.06719.14
5.4.270.0130.05718.85
5.4.260.0070.07318.87
5.4.250.0100.04319.15
5.4.240.0070.04319.07
5.4.230.0100.03318.87
5.4.220.0170.07018.85
5.4.210.0130.04719.20
5.4.200.0100.07319.23
5.4.190.0070.06019.23
5.4.180.0100.04019.23
5.4.170.0000.05318.91
5.4.160.0100.06719.09
5.4.150.0030.04019.22
5.4.140.0100.03016.38
5.4.130.0070.05716.34
5.4.120.0030.04316.44
5.4.110.0030.05016.34
5.4.100.0100.06716.46
5.4.90.0000.04016.58
5.4.80.0000.08016.38
5.4.70.0070.05716.46
5.4.60.0000.07016.39
5.4.50.0000.07716.45
5.4.40.0030.08016.46
5.4.30.0030.06316.27
5.4.20.0070.04316.50
5.4.10.0000.07016.25
5.4.00.0030.05015.84
5.3.290.0070.07714.59
5.3.280.0070.07314.53
5.3.270.0100.08014.53
5.3.260.0070.04014.70
5.3.250.0130.05714.58
5.3.240.0100.06314.55
5.3.230.0070.05014.52
5.3.220.0070.04014.45
5.3.210.0070.07014.38
5.3.200.0070.06714.67
5.3.190.0070.07014.36
5.3.180.0030.04014.44
5.3.170.0100.07314.45
5.3.160.0100.07014.45
5.3.150.0030.07314.46
5.3.140.0130.07314.35
5.3.130.0100.05014.52
5.3.120.0070.06314.48
5.3.110.0030.04014.49
5.3.100.0000.08013.86
5.3.90.0100.06013.84
5.3.80.0070.07313.85
5.3.70.0030.04314.03
5.3.60.0070.07313.95
5.3.50.0030.06013.89
5.3.40.0030.04713.92
5.3.30.0100.07313.75
5.3.20.0130.06313.51
5.3.10.0170.06013.75
5.3.00.0070.04713.56
5.2.170.0030.06711.09
5.2.160.0070.04011.23
5.2.150.0030.05311.00
5.2.140.0070.03311.11
5.2.130.0070.06011.11
5.2.120.0070.03011.00
5.2.110.0000.06011.05
5.2.100.0100.04310.99
5.2.90.0070.05011.03
5.2.80.0000.07311.04
5.2.70.0070.06011.04
5.2.60.0000.07311.03
5.2.50.0000.06310.95
5.2.40.0030.04011.14
5.2.30.0070.06011.13
5.2.20.0070.06310.86
5.2.10.0030.06010.89
5.2.00.0000.06310.72
5.1.60.0030.0579.98
5.1.50.0130.04310.07
5.1.40.0100.0439.95
5.1.30.0030.06010.22
5.1.20.0070.04310.36
5.1.10.0070.05010.06
5.1.00.0030.05310.11
5.0.50.0000.0478.56
5.0.40.0070.0238.53
5.0.30.0070.0638.53
5.0.20.0030.0438.53
5.0.10.0030.0478.53
5.0.00.0070.0608.53
4.4.90.0030.0278.53
4.4.80.0070.0238.53
4.4.70.0000.0378.53
4.4.60.0000.0378.53
4.4.50.0000.0408.53
4.4.40.0030.0538.53
4.4.30.0030.0378.53
4.4.20.0030.0378.53
4.4.10.0030.0338.53
4.4.00.0000.0508.53
4.3.110.0030.0278.53
4.3.100.0070.0238.53
4.3.90.0030.0278.53
4.3.80.0000.0538.53
4.3.70.0000.0308.53
4.3.60.0030.0338.53
4.3.50.0000.0308.53
4.3.40.0030.0478.53
4.3.30.0030.0138.53
4.3.20.0030.0138.53
4.3.10.0030.0338.53
4.3.00.0030.0208.53

preferences:
46.32 ms | 401 KiB | 5 Q