3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace SComparison; class Comparator { protected $_strings = array(); protected $_tests = array(); protected $_hash; public function __construct() { $this->_hash = new SHash(); } /** * converting input data */ protected function _prepareInput() { foreach ($this->_strings as $key => $string) { $this->_tests[$key] = str_replace(" ", "", strtolower($string)); } } protected function _outputInteractive($key) { echo "String: " . $this->_strings[$key] . "\n"; echo "Test: " . $this->_tests[$key] . "\n"; echo "Hash: " . $this->_hash->getHash(SHash::HASH_BIN) . " - " . $this->_hash->getHash() . "\n"; echo "-----------------------------------------------------------\n"; } /** * executing comparison action */ public function runInteractive() { $this->_prepareInput(); foreach ($this->_tests as $key => $test) { $this->_hash->setString($test); $this->_hash->getHash(); $this->_outputInteractive($key); } } public function runCL() { $this->_prepareInput(); foreach ($this->_tests as $key => $test) { $this->_hash->setString($test); $this->_hash->getHash(); $this->_outputInteractive($key); } } public function setStrings(array $strings) { $this->_strings = $strings; } }
Output for git.master, git.master_jit, rfc.property-hooks

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