3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait DataCollector { static function setData( $data ) { self::collectedData( 'set', $data ); } private function collectedData( $type, $value = NULL ) { static $CollectionData = array(); if( strtolow( $type ) === 'set' ) $CollectionData[] = $value; elseif( strtolow( $type ) === 'get' ) 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 ) { self::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)
5.4.170.0330.03018.82
5.4.160.0370.04719.07
5.4.150.0200.04019.11
5.4.140.0870.03016.35
5.4.130.0770.03016.28
5.4.120.0300.04316.31
5.4.110.0570.04716.44
5.4.100.0400.03716.55
5.4.90.0630.02716.50
5.4.80.0370.04016.44
5.4.70.0570.03716.33
5.4.60.0270.03716.22
5.4.50.0870.03016.51
5.4.40.0830.03316.32
5.4.30.0770.03716.16
5.4.20.0670.04316.55
5.4.10.0600.03716.50
5.4.00.0230.03315.84
5.3.270.0570.03015.23
5.3.260.0300.03715.23
5.3.250.0700.04015.23
5.3.240.0770.02315.23
5.3.230.0900.04015.23
5.3.220.0600.03315.23
5.3.210.0530.03315.23
5.3.200.0230.03715.23
5.3.190.0530.04015.23
5.3.180.0300.04315.23
5.3.170.0600.03715.23
5.3.160.0670.03315.23
5.3.150.0300.04315.23
5.3.140.0600.04015.23
5.3.130.0670.05315.23
5.3.120.0730.04015.23
5.3.110.0330.04015.23
5.3.100.0700.03015.22
5.3.90.0630.04715.22
5.3.80.0770.03015.22
5.3.70.0830.02715.22
5.3.60.0330.03715.22
5.3.50.0670.04315.22
5.3.40.0670.02715.22
5.3.30.0430.03315.22
5.3.20.0430.03715.22
5.3.10.0570.03015.22
5.3.00.0930.03015.22

preferences:
136.16 ms | 1394 KiB | 7 Q