3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $pos_faktura = "26769891/" . date('Y') . "/000"; $id = (int) substr($pos_faktura, -3); $nova_faktura = substr($pos_faktura, 0, 14).sprintf("03%d", $id++); echo "$nova_faktura";
based on QstIa
Output for 4.3.0 - 7.2.0
26769891/2015/030