3v4l.org

run code in 300+ PHP versions simultaneously
<?php $its = 1e5; $true = true; $fals = false; $stri = 'string'; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( $true ); if ( $fals ); if ( $stri ); } echo 'plain : ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( empty( $true ) ); if ( empty( $fals ) ); if ( empty( $stri ) ); } echo 'empty : ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( ! $true ); if ( ! $fals ); if ( ! $stri ); } echo 'not : ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( ! empty( $true ) ); if ( ! empty( $fals ) ); if ( ! empty( $stri ) ); } echo 'notemp: ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( isset( $true ) ); if ( isset( $fals ) ); if ( isset( $stri ) ); } echo 'isset : ', $old = ( hrtime(true)-$t ) / 1e9, "s\n"; $t = hrtime(true); for ( $i = 0; $i++ < $its; ) { if ( ! isset( $true ) ); if ( ! isset( $fals ) ); if ( ! isset( $stri ) ); } echo 'notiss: ', $old = ( hrtime(true)-$t ) / 1e9, "s\n";
Output for git.master
plain : 0.000856374s empty : 0.001074404s not : 0.001347609s notemp: 0.002751705s isset : 0.000980076s notiss: 0.002072525s
Output for git.master_jit
plain : 0.000841075s empty : 0.001159023s not : 0.001499154s notemp: 0.002571665s isset : 0.00101333s notiss: 0.002041948s
Output for rfc.property-hooks
plain : 0.000661194s empty : 0.000796076s not : 0.001197069s notemp: 0.001985525s isset : 0.000994655s notiss: 0.001375727s

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:
31 ms | 401 KiB | 8 Q