3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait DataCollector { static function setData( $data ) { self::collectedData( 'set', $data ); } private static function collectedData( $type, $value = NULL ) { static $CollectionData = array(); if( strtolower( $type ) === 'set' ) { $CollectionData[] = $value; var_dump($CollectionData); } elseif( strtolower( $type ) === 'get' ) echo 'here'; return $CollectionData; } private static function getCollectedData() { self::collectedData( 'get' ); } } trait dataHandler { use DataCollector { getCollectedData as public; } } class Form { use DataCollector {} } class Field extends Form { public function __construct( $type, $text = NULL ) { DataCollector::setData( $type ); } } $Field1 = new Field( 'text' ); $Field2 = new Field( 'html' ); var_dump( 'Collected Data', dataHandler::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.0140.00716.63
8.3.60.0140.00716.61
8.3.50.0090.00822.11
8.3.40.0090.00918.82
8.3.30.0070.00719.00
8.3.20.0030.00620.02
8.3.10.0080.00023.83
8.3.00.0000.00819.38
8.2.180.0150.00016.38
8.2.170.0120.00622.96
8.2.160.0120.00320.37
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0130.00322.31
8.2.110.0060.00320.36
8.2.100.0080.00317.88
8.2.90.0030.00519.17
8.2.80.0080.00017.97
8.2.70.0030.00617.59
8.2.60.0030.00618.04
8.2.50.0040.00418.07
8.2.40.0000.00717.99
8.2.30.0040.00418.14
8.2.20.0000.00817.87
8.2.10.0000.00818.19
8.2.00.0000.00817.73
8.1.280.0090.00625.92
8.1.270.0050.00323.92
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0040.00424.03
8.1.230.0120.00017.42
8.1.220.0000.00817.80
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.53
8.1.180.0000.00818.10
8.1.170.0050.00518.49
8.1.160.0000.00721.90
8.1.150.0040.00418.56
8.1.140.0040.00417.46
8.1.130.0030.00317.84
8.1.120.0040.00417.41
8.1.110.0000.00817.33
8.1.100.0000.00717.45
8.1.90.0000.00717.48
8.1.80.0040.00417.36
8.1.70.0030.00317.40
8.1.60.0000.00817.62
8.1.50.0060.00317.43
8.1.40.0030.00617.52
8.1.30.0040.00417.61
8.1.20.0080.00017.60
8.1.10.0040.00417.61
8.1.00.0000.00817.50
8.0.300.0040.00418.77
8.0.290.0060.00316.63
8.0.280.0030.00318.45
8.0.270.0000.00817.27
8.0.260.0030.00316.83
8.0.250.0040.00416.98
8.0.240.0000.00716.98
8.0.230.0050.00316.99
8.0.220.0000.00716.92
8.0.210.0000.00716.88
8.0.200.0000.00717.00
8.0.190.0060.00316.94
8.0.180.0030.00616.88
8.0.170.0060.00316.96
8.0.160.0040.00416.84
8.0.150.0040.00416.81
8.0.140.0090.00016.75
8.0.130.0050.00013.29
8.0.120.0040.00416.79
8.0.110.0000.00716.83
8.0.100.0040.00416.75
8.0.90.0040.00416.73
8.0.80.0090.00616.80
8.0.70.0000.00716.80
8.0.60.0040.00416.90
8.0.50.0040.00416.89
8.0.30.0100.00917.21
8.0.20.0140.00717.40
8.0.10.0060.00317.05
8.0.00.0150.00516.79
7.4.330.0050.00015.14
7.4.320.0030.00316.52
7.4.300.0030.00316.59
7.4.290.0030.00316.52
7.4.280.0080.00216.41
7.4.270.0030.00316.65
7.4.260.0040.00416.45
7.4.250.0000.00716.57
7.4.240.0030.00416.46
7.4.230.0000.00716.72
7.4.220.0110.00716.66
7.4.210.0040.01116.57
7.4.200.0000.00716.61
7.4.190.0000.00816.56
7.4.160.0150.00316.50
7.4.150.0070.01017.40
7.4.140.0100.00817.86
7.4.130.0070.01216.51
7.4.120.0090.00716.62
7.4.110.0100.01416.71
7.4.100.0080.01416.50
7.4.90.0110.00816.57
7.4.80.0120.00619.39
7.4.70.0080.00816.36
7.4.60.0090.01016.50
7.4.50.0030.00516.32
7.4.40.0070.00722.77
7.4.30.0030.01316.37
7.4.00.0040.01115.06
7.3.330.0000.00613.17
7.3.320.0020.00413.18
7.3.310.0000.00716.29
7.3.300.0000.00716.28
7.3.290.0110.00416.32
7.3.280.0050.01016.32
7.3.270.0170.00017.40
7.3.260.0080.01616.30
7.3.250.0100.01016.47
7.3.240.0140.00316.52
7.3.230.0090.01316.39
7.3.210.0080.00816.29
7.3.200.0140.00519.39
7.3.190.0190.00416.57
7.3.180.0090.00616.33
7.3.170.0060.00916.36
7.3.160.0110.00616.29
7.3.120.0100.00614.87
7.3.110.0140.00714.90
7.3.100.0030.01314.47
7.3.90.0000.01714.86
7.3.80.0080.00414.76
7.3.70.0030.00714.80
7.3.60.0090.00614.92
7.3.50.0030.00614.48
7.3.40.0090.00314.78
7.3.30.0030.00714.64
7.3.20.0030.01216.60
7.3.10.0040.00816.48
7.3.00.0030.01116.45
7.2.330.0090.00916.58
7.2.320.0070.01116.50
7.2.310.0100.00716.44
7.2.300.0090.00616.77
7.2.290.0110.00716.70
7.2.250.0040.01914.86
7.2.240.0130.00715.25
7.2.230.0090.00614.93
7.2.220.0000.01515.03
7.2.210.0030.01315.32
7.2.200.0060.00915.18
7.2.190.0070.01014.91
7.2.180.0060.00915.05
7.2.170.0070.00715.26
7.2.130.0040.00816.75
7.2.120.0040.01116.65
7.2.110.0110.00416.80
7.2.100.0090.00616.66
7.2.90.0070.00416.56
7.2.80.0040.00816.40
7.2.70.0060.00316.70
7.2.60.0060.00316.70
7.2.50.0100.00316.62
7.2.40.0110.00017.13
7.2.30.0000.00816.75
7.2.20.0040.00716.66
7.2.10.0060.00616.69
7.2.00.0030.00916.76
7.1.330.0070.00716.01
7.1.320.0040.01115.89
7.1.310.0030.00715.82
7.1.300.0110.00716.00
7.1.290.0040.01215.84
7.1.280.0060.00615.71
7.1.270.0070.01015.71
7.1.260.0090.00615.51
7.1.250.0060.00615.93
7.1.70.0100.01016.97
7.1.60.0070.00317.05
7.1.50.0140.00716.79
7.1.00.0030.07722.45
7.0.200.0040.01516.79
7.0.140.0130.06322.18
7.0.60.0070.04019.88
7.0.50.0100.07717.88
7.0.40.0030.04320.24
7.0.30.0430.06020.24
7.0.20.0430.07720.08
7.0.10.0100.07320.21
7.0.00.0130.04720.20
5.6.280.0030.07321.04
5.6.210.0070.06320.55
5.6.200.0130.06318.23
5.6.190.0100.04720.39
5.6.180.0100.04320.77
5.6.170.0200.06320.52
5.6.160.0100.07720.43
5.6.150.0070.07318.14
5.6.140.0100.05318.18
5.6.130.0000.06018.18
5.6.120.0070.08021.13
5.6.110.0100.08020.90
5.6.100.0070.08320.89
5.6.90.0230.05720.99
5.6.80.0170.07720.39
5.6.70.4370.03720.51
5.5.350.0070.05720.45
5.5.340.0070.08017.95
5.5.330.0100.07320.27
5.5.320.0270.05320.20
5.5.310.0100.04720.39
5.5.300.0170.07717.98
5.5.290.0030.04018.08
5.5.280.0100.08020.70
5.5.270.0070.04020.68
5.5.260.0130.07720.98
5.5.250.0070.08020.60
5.5.240.0130.05020.17
5.4.450.3430.04719.39
5.4.440.2800.03719.18
5.4.430.2330.04319.15
5.4.420.3030.03719.32
5.4.410.3370.05019.40
5.4.400.3070.03019.07
5.4.390.3370.05019.01
5.4.380.3000.03319.06
5.4.370.2800.04019.21
5.4.360.2900.03018.99
5.4.350.3100.03319.08
5.4.340.3130.04019.16
5.4.320.2870.03318.99
5.4.310.3030.03319.20
5.4.300.2770.03719.15
5.4.290.2730.03719.06
5.4.280.3230.03018.95
5.4.270.3200.03319.05
5.4.260.2830.04318.87
5.4.250.3200.03719.20
5.4.240.3270.02719.14
5.4.230.3100.04019.15
5.4.220.3100.04019.20
5.4.210.3170.04019.05
5.4.200.3000.04019.05
5.4.190.2900.03318.97
5.4.180.3130.03719.19
5.4.170.3330.04019.05
5.4.160.2830.03718.85
5.4.150.3470.03319.18
5.4.140.3070.03716.40
5.4.130.3200.03316.39
5.4.120.3100.03716.54
5.4.110.3270.03716.33
5.4.100.3030.04316.61
5.4.90.3400.04316.61
5.4.80.3000.03716.59
5.4.70.3470.04316.57
5.4.60.3470.04316.17
5.4.50.2930.03716.43
5.4.40.2930.03716.17
5.4.30.3200.04316.26
5.4.20.3100.03716.51
5.4.10.3200.03316.18
5.4.00.2530.03015.80
5.3.290.3200.04014.57
5.3.280.3130.03714.55
5.3.270.3370.03314.62
5.3.260.4370.03314.45
5.3.250.3130.03714.46
5.3.240.3100.03314.43
5.3.230.3100.04014.46
5.3.220.3070.03714.51
5.3.210.2870.03714.41
5.3.200.3130.03714.40
5.3.190.3170.03714.58
5.3.180.3030.04314.51
5.3.170.3100.03314.51
5.3.160.3270.03014.58
5.3.150.3200.03314.66
5.3.140.2830.04014.62
5.3.130.3000.03714.39
5.3.120.3030.03314.49
5.3.110.3170.04014.41
5.3.100.3130.03713.98
5.3.90.3070.03713.97
5.3.80.3100.03013.87
5.3.70.3030.03313.96
5.3.60.3100.03714.09
5.3.50.3330.04013.88
5.3.40.3200.03713.92
5.3.30.3070.03313.89
5.3.20.3070.03713.68
5.3.10.2870.03713.56
5.3.00.3300.03713.51
5.2.170.2670.02711.03
5.2.160.2570.02311.19
5.2.150.2470.03011.32
5.2.140.2330.03011.19
5.2.130.2700.03311.18
5.2.120.2570.02310.94
5.2.110.2430.03011.18
5.2.100.2470.02311.11
5.2.90.2430.03011.01
5.2.80.2630.03310.94
5.2.70.2630.02711.00
5.2.60.2500.02710.98
5.2.50.2930.03311.06
5.2.40.1770.02710.85
5.2.30.1900.03310.81
5.2.20.2230.02710.89
5.2.10.1970.03010.79
5.2.00.1930.02710.64
5.1.60.1900.0239.93
5.1.50.1930.02310.07
5.1.40.1900.0239.88
5.1.30.1930.03010.30
5.1.20.2100.02710.51
5.1.10.2070.02310.04
5.1.00.2170.0309.99
5.0.50.1100.0238.70
5.0.40.1100.0238.30
5.0.30.1170.0408.30
5.0.20.1200.0238.34
5.0.10.0930.0238.16
5.0.00.0670.0408.14
4.4.90.0030.0277.23
4.4.80.0030.0177.23
4.4.70.0000.0337.23
4.4.60.0030.0337.23
4.4.50.0000.0237.23
4.4.40.0000.0307.23
4.4.30.0000.0177.23
4.4.20.0000.0337.23
4.4.10.0030.0307.23
4.4.00.0000.0307.23
4.3.110.0070.0377.23
4.3.100.0000.0377.23
4.3.90.0030.0277.23
4.3.80.0000.0537.23
4.3.70.0030.0337.23
4.3.60.0000.0177.23
4.3.50.0000.0177.23
4.3.40.0000.0577.23
4.3.30.0030.0237.23
4.3.20.0000.0207.23
4.3.10.0400.0307.23
4.3.00.0600.0207.23

preferences:
49.7 ms | 401 KiB | 5 Q