3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $mockCliente = array( 'pf' => array ( 'cpf' => '8028098711', 'nome' => 'Caio César' ) ); $padleftcount = 11 - strlen($mockCliente['pf']['cpf']); $mockCliente['pf']['cpf'] = str_pad($mockCliente['pf']['cpf'], $padleftcount, '0', STR_PAD_LEFT); var_dump($mockCliente);
Output for 4.3.0 - 7.2.0
array(1) { ["pf"]=> array(2) { ["cpf"]=> string(10) "8028098711" ["nome"]=> string(11) "Caio César" } }