3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_sinted( string $val, string $val2 ) { return $val; } function test_hinted( string $val, $val2 ) { return $val; } function test_ninted( $val, $val2 ) { return $val; } /* "prime" */ test_sinted( 'hello', 'world' ); test_hinted( 'hello', 'world' ); test_ninted( 'hello', 'world' ); $t = microtime( true ); for( $i = 0; ++$i < 1e7; ) test_sinted( 'hello', 'world' ); echo number_format( ( microtime( true ) - $t ) * 1, 5 ), 's', PHP_EOL; $t = microtime( true ); for( $i = 0; ++$i < 1e7; ) test_hinted( 'hello', 'world' ); echo number_format( ( microtime( true ) - $t ) * 1, 5 ), 's', PHP_EOL; $t = microtime( true ); for( $i = 0; ++$i < 1e7; ) test_ninted( 'hello', 'world' ); echo number_format( ( microtime( true ) - $t ) * 1, 5 ), 's', PHP_EOL;
Output for 8.3.10
0.15188s 0.10953s 0.11440s
Output for 8.0.12
0.25948s 0.24369s 0.23970s
Output for 8.0.11
0.25773s 0.26235s 0.22859s
Output for 8.0.10
0.24784s 0.23945s 0.21494s
Output for 8.0.9
0.23918s 0.23903s 0.21628s
Output for 8.0.8
0.24409s 0.23943s 0.21340s
Output for 8.0.7
0.23881s 0.24034s 0.21560s
Output for 8.0.6
0.23903s 0.23908s 0.21295s
Output for 8.0.5
0.24107s 0.23943s 0.21309s
Output for 8.0.3
0.24245s 0.24071s 0.21380s
Output for 8.0.2
0.24057s 0.24194s 0.21426s
Output for 8.0.1
0.23876s 0.24003s 0.21592s
Output for 8.0.0
0.24154s 0.23949s 0.21484s
Output for 7.4.25
0.26329s 0.25570s 0.21695s
Output for 7.4.24
0.26598s 0.25564s 0.21391s
Output for 7.4.23
0.26586s 0.25545s 0.21430s
Output for 7.4.22
0.26542s 0.25517s 0.21413s
Output for 7.4.21
0.26575s 0.27426s 0.23317s
Output for 7.4.20
0.28122s 0.26654s 0.23915s
Output for 7.4.19
0.30676s 0.31131s 0.23738s
Output for 7.4.18
0.30165s 0.30166s 0.23847s
Output for 7.4.16
0.29254s 0.30684s 0.23734s
Output for 7.4.15
0.28562s 0.25567s 0.21542s
Output for 7.4.14
0.27111s 0.25619s 0.21442s
Output for 7.4.13
0.26184s 0.25884s 0.21524s
Output for 7.4.12
0.27997s 0.25874s 0.21502s
Output for 7.4.11
0.26207s 0.25511s 0.21512s
Output for 7.4.10
0.26907s 0.25563s 0.21380s
Output for 7.4.9
0.26197s 0.25692s 0.21425s
Output for 7.4.8
0.26166s 0.25723s 0.23618s
Output for 7.4.7
0.30159s 0.29404s 0.24290s
Output for 7.4.6
0.29416s 0.27870s 0.23529s
Output for 7.4.5
0.30674s 0.29398s 0.24782s
Output for 7.4.4
0.29147s 0.25575s 0.21522s
Output for 7.4.3
0.26963s 0.25735s 0.21554s
Output for 7.4.2
0.26620s 0.26529s 0.22057s
Output for 7.4.1
0.26650s 0.25904s 0.21557s
Output for 7.4.0
0.26486s 0.25887s 0.21654s
Output for 7.3.32
0.29383s 0.27474s 0.22178s
Output for 7.3.31
0.29217s 0.27409s 0.22164s
Output for 7.3.30
0.29338s 0.27459s 0.22210s
Output for 7.3.29
0.29136s 0.27700s 0.22166s
Output for 7.3.28
0.29017s 0.27735s 0.22564s
Output for 7.3.27
0.29010s 0.27692s 0.22371s
Output for 7.3.26
0.29101s 0.27799s 0.22274s
Output for 7.3.25
0.28677s 0.27652s 0.22190s
Output for 7.3.24
0.29483s 0.27427s 0.22147s
Output for 7.3.23
0.29191s 0.27332s 0.22129s
Output for 7.3.22
0.29387s 0.28353s 0.22203s
Output for 7.3.21
0.29822s 0.28420s 0.23326s
Output for 7.3.20
0.28899s 0.27894s 0.22671s
Output for 7.3.19
0.29781s 0.27688s 0.22471s
Output for 7.3.18
0.29107s 0.27559s 0.22212s
Output for 7.3.17
0.29097s 0.27360s 0.22265s
Output for 7.3.16
0.29133s 0.29439s 0.24238s
Output for 7.3.15
0.34018s 0.30412s 0.25280s
Output for 7.3.14
0.32598s 0.29940s 0.25548s
Output for 7.3.13
0.33951s 0.32026s 0.23315s
Output for 7.3.12
0.29300s 0.28417s 0.21950s
Output for 7.3.11
0.28650s 0.27778s 0.21886s
Output for 7.3.10
0.30075s 0.28717s 0.25087s
Output for 7.3.9
0.32179s 0.31371s 0.25101s
Output for 7.3.8
0.31887s 0.32535s 0.24934s
Output for 7.3.7
0.29722s 0.29189s 0.21979s
Output for 7.3.6
0.28386s 0.27511s 0.21917s
Output for 7.3.5
0.28599s 0.27646s 0.21895s
Output for 7.3.4
0.28758s 0.27235s 0.21889s
Output for 7.3.3
0.28611s 0.27416s 0.21885s
Output for 7.3.2
0.28707s 0.27871s 0.22297s
Output for 7.3.1
0.29413s 0.27837s 0.25300s
Output for 7.3.0
0.33704s 0.28677s 0.24616s

preferences:
54.61 ms | 506 KiB | 5 Q