3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = new \Random\Randomizer(); $chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; $lens = [10, 100, 1000, 1024 * 1024, 1024 * 1024 * 10]; // bcrypt foreach ($lens as $len) { $pw = $r->getBytesFromString($chars, $len); $time = microtime(true); password_hash($pw, PASSWORD_DEFAULT); echo microtime(true) - $time . ' ms (bcrypt ' . strlen($pw) . " chars)\n"; } // PBKDF2 foreach ($lens as $len) { $pw = $r->getBytesFromString($chars, $len); $time = microtime(true); hash_pbkdf2('sha256', $pw, 'salt', 100000); echo microtime(true) - $time . ' ms (PBKDF2 ' . strlen($pw) . " chars)\n"; } // SHA-1 $time = microtime(true); foreach ($lens as $len) { $pw = $r->getBytesFromString($chars, $len); $time = microtime(true); sha1($pw); echo microtime(true) - $time . ' ms (SHA-1 ' . strlen($pw) . " chars)\n"; }
Output for git.master
0.23450803756714 ms (bcrypt 10 chars) 0.23334813117981 ms (bcrypt 100 chars) 0.23403596878052 ms (bcrypt 1000 chars) 0.2347400188446 ms (bcrypt 1048576 chars)
Process exited with code 137.
Output for git.master_jit
0.24096488952637 ms (bcrypt 10 chars) 0.23931694030762 ms (bcrypt 100 chars) 0.23736190795898 ms (bcrypt 1000 chars) 0.23769187927246 ms (bcrypt 1048576 chars)
Process exited with code 137.
Output for rfc.property-hooks
0.23885107040405 ms (bcrypt 10 chars) 0.23790502548218 ms (bcrypt 100 chars) 0.23576402664185 ms (bcrypt 1000 chars) 0.23903298377991 ms (bcrypt 1048576 chars)
Process exited with code 137.

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:
33.86 ms | 408 KiB | 5 Q