3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait DataCollector { static $collectionData = array(); abstract public function setData( $data ) { self::$CollectionData[] = $data; return $this; } abstract public function getCollectedData() { return self::$CollectionData; } } class Form {} class Field extends Form { use DataCollector; public function __construct( $type, $text = NULL ) { $this->setData( $type ); } } $Field1 = new Field( 'text' ); var_dump( $Field1->getCollectedData() ); $Field2 = new Field( 'html', 'hello' ); var_dump( $Field2->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.0300.09012.38
5.4.160.0150.04912.38
5.4.150.0140.04712.37
5.4.140.0150.04412.05
5.4.130.0210.04612.04
5.4.120.0210.04412.00
5.4.110.0160.04212.00
5.4.100.0130.06312.00
5.4.90.0200.04012.00
5.4.80.0140.04612.00
5.4.70.0160.05612.00
5.4.60.0160.04412.00
5.4.50.0160.04711.99
5.4.40.0150.04511.98
5.4.30.0150.05911.98
5.4.20.0150.04111.98
5.4.10.0160.04411.98
5.4.00.0160.04211.47
5.3.270.0170.04412.72
5.3.260.0170.04612.72
5.3.250.0170.04712.72
5.3.240.0180.04412.72
5.3.230.0130.04912.71
5.3.220.0230.05512.68
5.3.210.0170.06012.68
5.3.200.0200.04212.68
5.3.190.0140.04912.68
5.3.180.0190.06212.68
5.3.170.0150.04712.67
5.3.160.0180.04812.67
5.3.150.0210.05812.67
5.3.140.0190.04612.66
5.3.130.0190.04712.66
5.3.120.0160.04812.66
5.3.110.0140.04912.66
5.3.100.0180.04612.12
5.3.90.0160.04312.09
5.3.80.0140.05112.07
5.3.70.0160.05012.07
5.3.60.0210.05712.06
5.3.50.0160.04912.00
5.3.40.0260.06712.00
5.3.30.0170.04211.94
5.3.20.0130.06111.73
5.3.10.0140.04111.69
5.3.00.0140.04211.67

preferences:
141.43 ms | 1386 KiB | 7 Q