3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('a', 'b', 'c', 'd'); usort($array, 'some_sort_function'); function some_sort_function($a, $b) { static $foo = NULL; if ($foo === NULL) { $foo = 'bar'; echo "just once?\n"; } return 0; }
based on Ng8JL
Output for 4.3.0 - 7.1.0
just once?