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;

preferences:
40.89 ms | 405 KiB | 5 Q