3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait DataCollector { protected static $CollectionData = array(); static function setData( $data ) { self::$CollectionData[] = $data; } static function getCollectedData() { return self::$CollectionData; } } class dataHandler { use DataCollector } class Form {} class Field extends Form { use DataCollector { getCollectedData as private; } public function __construct( $type, $text = NULL ) { self::setData( $type ); } } $Field1 = new Field( 'text' ); $Field2 = new Field( 'html', 'hello' ); var_dump( 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)
5.4.170.0130.04412.39
5.4.160.0160.04512.38
5.4.150.0150.04612.38
5.4.140.0120.04612.07
5.4.130.0130.04612.05
5.4.120.0150.04412.02
5.4.110.0320.08712.01
5.4.100.0150.04412.02
5.4.90.0160.04312.02
5.4.80.0200.05412.01
5.4.70.0180.04312.01
5.4.60.0160.04412.01
5.4.50.0230.05112.01
5.4.40.0190.05512.00
5.4.30.0220.05312.00
5.4.20.0160.05711.99
5.4.10.0160.04211.99
5.4.00.0150.04211.49
5.3.270.0160.04712.72
5.3.260.0220.05612.72
5.3.250.0130.04712.72
5.3.240.0210.04212.72
5.3.230.0180.04412.71
5.3.220.0180.04512.68
5.3.210.0290.06412.68
5.3.200.0310.07912.68
5.3.190.0150.04712.68
5.3.180.0250.06612.67
5.3.170.0190.04212.67
5.3.160.0200.04312.67
5.3.150.0150.04512.67
5.3.140.0250.05312.66
5.3.130.0180.05812.66
5.3.120.0180.04312.66
5.3.110.0200.04212.66
5.3.100.0160.04612.12
5.3.90.0220.04112.08
5.3.80.0180.04512.07
5.3.70.0150.04712.08
5.3.60.0220.04312.06
5.3.50.0150.04712.00
5.3.40.0270.06412.00
5.3.30.0200.05311.95
5.3.20.0140.04411.73
5.3.10.0160.04111.69
5.3.00.0160.06911.67

preferences:
137.14 ms | 1394 KiB | 7 Q