[lang-ref] ( drop_last_n ) ( php )

<?php
public function testDropLastN(): void
{
	// substr($s, 0, -$n)
	$text = '0123456789';
	$n = 3;

	$part = substr($text, 0, -$n);

	$this->assertSame('0123456', $part);
}