<?php $signed_number_strings = ["--1", "---33", "+-444"]; foreach ($signed_number_strings as $string) { var_dump((int)preg_replace('~\++|-\+*-\+*~', '', $string)); }
You have javascript disabled. You will not be able to edit any code.