3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait setData { static function setData( $data ) { DataCollector::collectedData( 'set', $data ); } } trait dataHandler { static function getCollectedData() { DataCollector::collectedData( 'get' ); } private static function collectedData( $type, $value = NULL ) { if( strtolower( $type ) === 'set' ) { self::$CollectionData[] = $value; var_dump(self::$CollectionData); } elseif( strtolower( $type ) === 'get' ) return self::$CollectionData; } } class DataCollector { use dataHandler { collectedData as public; } private static $CollectionData = array(); } class Form { use setData {} } class Field extends Form { public function __construct( $type, $text = NULL ) { DataCollector::setData( $type ); } } class A { use setData{} public function __construct( $type, $text = NULL ) { self::setData( $type ); } } $Field1 = new Field( '1' ); $Field2 = new Field( '2' ); $A = new A( '3' ); DataCollector::setData('4'); dataHandler::setData('5'); var_dump( DataCollector::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.0040.01116.61
8.3.50.0080.01221.92
8.3.40.0120.00318.92
8.3.30.0110.00319.13
8.3.20.0030.00520.34
8.3.10.0040.00423.65
8.3.00.0030.00519.38
8.2.180.0120.00616.32
8.2.170.0040.01122.96
8.2.160.0070.00720.47
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00422.25
8.2.110.0050.00522.16
8.2.100.0090.00317.72
8.2.90.0000.00919.28
8.2.80.0040.00418.03
8.2.70.0030.00617.63
8.2.60.0000.00817.93
8.2.50.0030.00918.07
8.2.40.0050.00320.07
8.2.30.0080.00019.79
8.2.20.0000.00717.78
8.2.10.0040.00418.05
8.2.00.0030.00517.77
8.1.280.0150.00325.92
8.1.270.0090.00623.86
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0060.00324.02
8.1.230.0040.00819.10
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.48
8.1.190.0080.00017.41
8.1.180.0050.00318.10
8.1.170.0080.00018.48
8.1.160.0000.00821.95
8.1.150.0000.00818.52
8.1.140.0050.00317.37
8.1.130.0050.00217.79
8.1.120.0040.00417.49
8.1.110.0040.00417.38
8.1.100.0080.00017.35
8.1.90.0040.00417.37
8.1.80.0000.00817.43
8.1.70.0050.00317.41
8.1.60.0030.00617.57
8.1.50.0040.00417.37
8.1.40.0000.00917.43
8.1.30.0040.00417.54
8.1.20.0040.00417.50
8.1.10.0030.00517.57
8.1.00.0040.00417.39
8.0.300.0040.00420.78
8.0.290.0000.00717.05
8.0.280.0050.00318.54
8.0.270.0070.00017.20
8.0.260.0040.00417.30
8.0.250.0000.00717.09
8.0.240.0030.00517.04
8.0.230.0000.00716.96
8.0.220.0030.00317.01
8.0.210.0000.00717.05
8.0.200.0030.00316.97
8.0.190.0030.00617.11
8.0.180.0040.00416.99
8.0.170.0080.00016.93
8.0.160.0080.00016.91
8.0.150.0050.00216.87
8.0.140.0000.00717.02
8.0.130.0000.00613.38
8.0.120.0000.00817.03
8.0.110.0000.00716.98
8.0.100.0040.00416.96
8.0.90.0000.00817.02
8.0.80.0030.01816.88
8.0.70.0000.00716.82
8.0.60.0000.00717.03
8.0.50.0040.00416.76
8.0.30.0110.01017.19
8.0.20.0140.00517.40
8.0.10.0080.00017.09
8.0.00.0110.00916.81
7.4.330.0050.00015.09
7.4.320.0030.00316.59
7.4.300.0000.00616.48
7.4.290.0070.00016.57
7.4.280.0030.00316.47
7.4.270.0030.00516.38
7.4.260.0040.00416.44
7.4.250.0080.00016.50
7.4.240.0050.00216.52
7.4.230.0030.00316.36
7.4.220.0080.00816.49
7.4.210.0090.01016.51
7.4.200.0040.00416.31
7.4.190.0000.00816.64
7.4.160.0100.00616.38
7.4.150.0140.00517.40
7.4.140.0080.01117.86
7.4.130.0100.00716.60
7.4.120.0070.01116.44
7.4.110.0050.01116.54
7.4.100.0120.00616.80
7.4.90.0110.00616.48
7.4.80.0060.01219.39
7.4.70.0030.01316.49
7.4.60.0090.00816.22
7.4.50.0000.00816.45
7.4.40.0070.01416.33
7.4.30.0000.01616.52
7.4.10.0180.00015.07
7.4.00.0070.01115.13
7.3.330.0030.00313.35
7.3.320.0000.00613.27
7.3.310.0000.00716.20
7.3.300.0000.00616.38
7.3.290.0110.00316.40
7.3.280.0130.00816.37
7.3.270.0070.01417.40
7.3.260.0030.02016.38
7.3.250.0090.00816.36
7.3.240.0060.01016.42
7.3.230.0120.00616.41
7.3.210.0070.01016.55
7.3.200.0130.00316.41
7.3.190.0090.01016.51
7.3.180.0190.00316.34
7.3.170.0000.01516.41
7.3.160.0080.00816.36
7.3.130.0040.01114.62
7.3.120.0060.01214.86
7.3.110.0020.01814.94
7.3.100.0070.01014.65
7.3.90.0050.01014.96
7.3.80.0080.00614.94
7.3.70.0030.01014.88
7.3.60.0030.01014.73
7.3.50.0080.00414.74
7.3.40.0050.01014.80
7.3.30.0030.01114.73
7.3.20.0050.00716.72
7.3.10.0080.00416.54
7.3.00.0110.00316.45
7.2.330.0150.00316.38
7.2.320.0110.00716.74
7.2.310.0070.01116.70
7.2.300.0060.01016.26
7.2.290.0100.00816.26
7.2.260.0030.01315.11
7.2.250.0040.01414.95
7.2.240.0070.00914.95
7.2.230.0070.01015.01
7.2.220.0090.00814.87
7.2.210.0030.01014.71
7.2.200.0050.00814.87
7.2.190.0020.01314.73
7.2.180.0060.00914.96
7.2.170.0050.01014.91
7.2.160.0090.00614.88
7.2.150.0000.01616.93
7.2.140.0040.01116.95
7.2.130.0060.01116.56
7.2.120.0070.00816.70
7.2.110.0080.00616.77
7.2.100.0050.00616.68
7.2.90.0050.00816.80
7.2.80.0030.00716.65
7.2.70.0030.00916.79
7.2.60.0090.00616.78
7.2.50.0080.00316.66
7.2.40.0090.00516.76
7.2.30.0100.00516.88
7.2.20.0020.01216.98
7.2.10.0040.00716.69
7.2.00.0070.00916.76
7.1.330.0020.01215.68
7.1.320.0020.01215.66
7.1.310.0090.00515.87
7.1.300.0050.01215.63
7.1.290.0070.00815.69
7.1.280.0070.00615.60
7.1.270.0040.00615.69
7.1.260.0080.00715.69
7.1.250.0070.00415.66
7.1.240.0030.01015.79
7.1.230.0000.00915.55
7.1.220.0030.00915.79
7.1.210.0060.00615.75
7.1.200.0040.00615.64
7.1.190.0060.00915.76
7.1.180.0030.00715.49
7.1.170.0100.00315.80
7.1.160.0000.01015.57
7.1.150.0090.00315.79
7.1.140.0000.00815.45
7.1.130.0030.01015.39
7.1.120.0060.01315.47
7.1.110.0040.00815.82
7.1.100.0040.00715.36
7.1.90.0040.01115.64
7.1.80.0090.00615.51
7.1.70.0040.00716.39
7.1.60.0020.01517.61
7.1.50.0060.00816.08
7.1.40.0080.00415.34
7.1.30.0100.00315.70
7.1.20.0040.01115.58
7.1.10.0030.01215.71
7.1.00.0030.04319.07
7.0.330.0040.00715.37
7.0.320.0040.00815.48
7.0.310.0040.00715.27
7.0.300.0030.00915.39
7.0.290.0070.00715.18
7.0.280.0040.00415.36
7.0.270.0090.00315.34
7.0.260.0060.01115.17
7.0.250.0030.00615.49
7.0.240.0000.00815.38
7.0.230.0080.00415.27
7.0.220.0030.01315.46
7.0.210.0050.00315.10
7.0.200.0020.00915.98
7.0.190.0120.00015.17
7.0.180.0040.00715.36
7.0.170.0040.00715.23
7.0.160.0070.00715.30
7.0.150.0030.00615.34
7.0.140.0070.03818.77
7.0.130.0000.01015.08
7.0.120.0030.00915.49
7.0.110.0030.00515.51
7.0.100.0050.00515.40
7.0.90.0040.01115.20
7.0.80.0060.00915.29
7.0.70.0070.03718.52
7.0.60.0030.02318.56
7.0.50.0070.02218.75
7.0.40.0070.04016.69
7.0.30.0060.02316.74
7.0.20.0020.02716.70
7.0.10.0040.03416.61
7.0.00.0050.02216.77
5.6.400.0030.01014.29
5.6.390.0060.00914.37
5.6.380.0060.00614.32
5.6.370.0040.01114.34
5.6.360.0080.00814.34
5.6.350.0060.00614.27
5.6.340.0030.00914.67
5.6.330.0160.00314.37
5.6.320.0060.00614.21
5.6.310.0080.00314.14
5.6.300.0070.00414.32
5.6.290.0100.00714.23
5.6.280.0070.03617.69
5.6.270.0000.01314.39
5.6.260.0030.01214.33
5.6.250.0030.00714.20
5.6.240.0030.00714.33
5.6.230.0120.00314.15
5.6.220.0020.02517.41
5.6.210.0040.02517.37
5.6.200.0020.02717.52
5.6.190.0050.03517.77
5.6.180.0020.03717.70
5.6.170.0030.02717.62
5.6.160.0050.02017.51
5.6.150.0050.02317.62
5.6.140.0060.03617.64
5.6.130.0050.02217.68
5.6.120.0080.04517.54
5.6.110.0080.04217.54
5.6.100.0020.03417.69
5.6.90.0070.04517.55
5.6.80.0060.02317.29
5.6.70.0050.04617.24
5.6.60.0020.04917.35
5.6.50.0030.04217.24
5.6.40.0020.05017.26
5.6.30.0030.03617.30
5.6.20.0050.02617.42
5.6.10.0020.04817.37
5.6.00.0040.04417.22
5.5.380.0030.01014.32
5.5.370.0060.00914.28
5.5.360.0070.02617.32
5.5.350.0070.02517.16
5.5.340.0070.03217.60
5.5.330.0080.02217.55
5.5.320.0080.02117.34
5.5.310.0020.02717.79
5.5.300.0030.02517.54
5.5.290.0030.02317.68
5.5.280.0030.02817.45
5.5.270.0070.02917.49
5.5.260.0020.04017.58
5.5.250.0080.02717.40
5.5.240.0050.04217.14
5.5.230.0050.04617.36
5.5.220.0050.02917.14
5.5.210.0080.04017.23
5.5.200.0070.03917.10
5.5.190.0060.04517.14
5.5.180.0020.04917.19
5.5.170.0000.01214.09
5.5.160.0030.04717.25
5.5.150.0060.04517.14
5.5.140.0050.04116.99
5.5.130.0100.02717.06
5.5.120.0060.03217.03
5.5.110.0070.03217.17
5.5.100.0050.04516.95
5.5.90.0060.04317.15
5.5.80.0060.04417.18
5.5.70.0050.04617.05
5.5.60.0070.03216.96
5.5.50.0030.03717.17
5.5.40.0070.04316.85
5.5.30.0100.04216.97
5.5.20.0030.03316.89
5.5.10.0030.04717.16
5.5.00.0020.02517.01
5.4.450.0020.02515.36
5.4.440.0020.02515.30
5.4.430.0050.04515.40
5.4.420.0050.03515.37
5.4.410.0000.03815.26
5.4.400.0030.02515.11
5.4.390.0000.04415.22
5.4.380.0040.02515.21
5.4.370.0020.04415.24
5.4.360.0050.03015.21
5.4.350.0030.04315.21
5.4.340.0000.03715.29
5.4.330.0030.00711.37
5.4.320.0090.01915.28
5.4.310.0050.02715.27
5.4.300.0020.03715.20
5.4.290.0030.02915.26
5.4.280.0080.03815.25
5.4.270.0050.03415.28
5.4.260.0030.04315.24
5.4.250.0060.03315.29
5.4.240.0070.03915.26
5.4.230.0080.03615.30
5.4.220.0060.04015.19
5.4.210.0080.02815.25
5.4.200.0080.04015.25
5.4.190.0020.04515.25
5.4.180.0050.04015.15
5.4.170.0070.03915.20
5.4.160.0050.04315.25
5.4.150.0030.04615.24
5.4.140.0080.03713.92
5.4.130.0070.03113.96
5.4.120.0060.03813.88
5.4.110.0020.03813.93
5.4.100.0020.04313.97
5.4.90.0070.03713.88
5.4.80.0020.03813.94
5.4.70.0040.03313.87
5.4.60.0000.03713.84
5.4.50.0040.04013.90
5.4.40.0060.03913.91
5.4.30.0070.03513.86
5.4.20.0080.03713.92
5.4.10.0030.02813.81
5.4.00.0030.04113.63
5.3.290.0020.04213.01
5.3.280.0050.04012.91
5.3.270.0030.02712.94
5.3.260.0030.04512.96
5.3.250.0100.03812.98
5.3.240.0030.04012.90
5.3.230.0020.03512.97
5.3.220.0020.04512.90
5.3.210.0030.03312.97
5.3.200.0050.03312.96
5.3.190.0030.02612.97
5.3.180.0020.04212.94
5.3.170.0050.04012.92
5.3.160.0090.03812.96
5.3.150.0090.03612.96
5.3.140.0050.03512.92
5.3.130.0030.04312.96
5.3.120.0010.04012.87
5.3.110.0030.04312.96
5.3.100.0050.04012.67
5.3.90.0050.02512.65
5.3.80.0050.02712.65
5.3.70.0000.03012.68
5.3.60.0000.02312.65
5.3.50.0020.04212.59
5.3.40.0050.03712.67
5.3.30.0050.03912.58
5.3.20.0030.03312.51
5.3.10.0050.03812.44
5.3.00.0030.04012.43
5.2.170.0030.05712.15
5.2.160.0000.05312.15
5.2.150.0030.06312.15
5.2.140.0000.06712.15
5.2.130.0030.06012.15
5.2.120.0030.06012.15
5.2.110.0030.06012.15
5.2.100.0000.06312.15
5.2.90.0000.05712.15
5.2.80.0030.05312.15
5.2.70.0000.06012.15
5.2.60.0000.05312.15
5.2.50.0000.06312.15
5.2.40.0130.05312.15
5.2.30.0030.05712.15
5.2.20.0030.06012.15
5.2.10.0030.05712.15
5.2.00.0030.04312.15
5.1.60.0000.03712.15
5.1.50.0030.04312.15
5.1.40.0000.04312.15
5.1.30.0000.04312.15
5.1.20.0000.05712.15
5.1.10.0000.03712.15
5.1.00.0000.03312.15
5.0.50.0000.04012.15
5.0.40.0000.04012.15
5.0.30.0000.05312.15
5.0.20.0000.04312.15
5.0.10.0000.03712.15
5.0.00.0000.06012.15
4.4.90.0000.03712.15
4.4.80.0030.03012.15
4.4.70.0030.03312.15
4.4.60.0000.03012.15
4.4.50.0030.03712.15
4.4.40.0070.05012.15
4.4.30.0030.03312.15
4.4.20.0030.02312.15
4.4.10.0070.03012.15
4.4.00.0100.04712.15
4.3.110.0000.02312.15
4.3.100.0030.03312.15
4.3.90.0000.03712.15
4.3.80.0000.04712.15
4.3.70.0000.02712.15
4.3.60.0000.03712.15
4.3.50.0000.03712.15
4.3.40.0000.04712.15
4.3.30.0030.03312.15
4.3.20.0030.03012.15
4.3.10.0000.03312.15
4.3.00.0030.02712.15

preferences:
45.6 ms | 401 KiB | 5 Q