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;

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)
8.3.100.0200.37437.54
8.0.120.0070.74813.27
8.0.110.0070.75013.30
8.0.100.0030.70613.28
8.0.90.0030.70013.32
8.0.80.0030.70213.18
8.0.70.0000.70313.43
8.0.60.0030.69613.36
8.0.50.0100.69313.40
8.0.30.0070.69813.32
8.0.20.0000.70513.34
8.0.10.0070.69513.48
8.0.00.0030.70313.42
7.4.250.0120.73613.37
7.4.240.0100.73813.33
7.4.230.0130.73713.42
7.4.220.0170.73213.46
7.4.210.0070.77813.30
7.4.200.0030.78713.38
7.4.190.0230.82913.28
7.4.180.0100.83613.40
7.4.160.0200.82613.42
7.4.150.0150.75013.37
7.4.140.0100.74413.27
7.4.130.0000.74913.21
7.4.120.0090.75813.21
7.4.110.0070.73713.29
7.4.100.0070.74213.43
7.4.90.0030.73813.17
7.4.80.0130.75113.21
7.4.70.0070.83813.21
7.4.60.0130.80813.40
7.4.50.0130.83513.22
7.4.40.0100.76613.32
7.4.30.0070.74913.21
7.4.20.0070.75813.38
7.4.10.0070.74713.25
7.4.00.0100.74313.25
7.3.320.0130.79013.16
7.3.310.0100.79113.38
7.3.300.0100.79313.35
7.3.290.0100.79413.43
7.3.280.0030.80313.35
7.3.270.0030.80113.45
7.3.260.0160.78813.18
7.3.250.0070.79313.38
7.3.240.0070.79813.32
7.3.230.0070.79313.27
7.3.220.0070.80213.23
7.3.210.0030.82113.12
7.3.200.0070.79813.21
7.3.190.0030.80513.25
7.3.180.0100.79313.35
7.3.170.0070.78913.22
7.3.160.0070.82813.04
7.3.150.0070.89613.36
7.3.140.0070.88413.30
7.3.130.0090.89413.34
7.3.120.0030.80013.15
7.3.110.0070.78313.09
7.3.100.0070.83413.07
7.3.90.0070.88513.55
7.3.80.0120.88913.12
7.3.70.0000.81613.50
7.3.60.0070.77813.55
7.3.50.0070.78213.36
7.3.40.0030.78213.58
7.3.30.0000.78513.45
7.3.20.0070.79015.34
7.3.10.0070.82315.34
7.3.00.0030.87315.30

preferences:
26.73 ms | 403 KiB | 5 Q