3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait DataCollector { static function setData( $data ) { protected static $CollectionData = array(); echo self::$CollectionData[] = $data; echo "\n"; } static function getCollectedData() { return self::$CollectionData; } } class dataHandler { use DataCollector {} } class Form { use DataCollector { getCollectedData as private; } } class Field extends Form { public function __construct( $type ) { self::setData( $type ); } } $Field1 = new Field( 'text' ); $Field2 = new Field( 'email' ); 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.0240.04912.39
5.4.160.0140.04812.38
5.4.150.0180.04312.38
5.4.140.0160.04412.07
5.4.130.0270.06312.05
5.4.120.0160.04212.01
5.4.110.0200.05612.01
5.4.100.0150.04512.01
5.4.90.0140.04412.01
5.4.80.0200.05512.01
5.4.70.0190.05512.01
5.4.60.0200.04312.01
5.4.50.0160.04212.01
5.4.40.0140.05911.99
5.4.30.0150.04511.99
5.4.20.0170.04211.99
5.4.10.0230.05311.99
5.4.00.0150.04311.48
5.3.270.0190.04612.72
5.3.260.0270.04912.72
5.3.250.0180.04712.72
5.3.240.0160.04512.72
5.3.230.0210.04412.71
5.3.220.0180.04312.68
5.3.210.0190.04312.68
5.3.200.0210.04112.68
5.3.190.0230.05712.67
5.3.180.0160.04612.67
5.3.170.0150.04512.67
5.3.160.0140.04712.67
5.3.150.0270.06312.67
5.3.140.0190.05612.66
5.3.130.0140.04612.66
5.3.120.0190.05812.66
5.3.110.0160.04712.66
5.3.100.0190.04212.12
5.3.90.0250.04912.08
5.3.80.0180.04312.08
5.3.70.0160.04512.08
5.3.60.0180.04212.06
5.3.50.0170.04312.00
5.3.40.0210.04112.00
5.3.30.0210.05211.94
5.3.20.0210.03911.73
5.3.10.0200.03911.69
5.3.00.0240.04711.67

preferences:
130.81 ms | 1394 KiB | 7 Q