3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = ''; for( $i = 0; $i <= 100; $i++ ) { $str .= str_shuffle('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'); } $start = microtime(true); for( $i = 0; $i<800000; $i++ ) { substr_count( 'foobar', $str ); } echo "count: " . (microtime(true)-$start) . PHP_EOL; $start = microtime(true); for( $i = 0; $i<800000; $i++ ) { preg_match_all( '/foobar/', $str ); } echo "rcount: " . (microtime(true)-$start) . PHP_EOL;
Output for git.master
count: 0.01997709274292 rcount: 0.3957200050354
Output for git.master_jit
count: 0.029967069625854 rcount: 0.34088683128357
Output for rfc.property-hooks
count: 0.019608020782471 rcount: 0.31508302688599

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
34.49 ms | 401 KiB | 8 Q