3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "/(%\S*)/"; $replacement = "%s"; $input_str = "Controller '%d is potentially leaking. All controllers are supposed to have an empty reference count. If this is a non synch sound controller, then script will need to make sure to clean it up."; $messageParameters = ["CVSNyz368g="]; if (preg_match_all($pattern, $input_str, $matches_out)) { $printfCodes = $matches_out[1]; foreach ($printfCodes as $index => $printfCode) { if ($printfCode != "%s" && $printfCode != "%c") { $decodedIntAsString = $messageParameters[$index] . " translated!"; $messageParameters[$index] = $decodedIntAsString; } } if (count($printfCodes) == count($assert['Message Parameter'])) { $new_str = preg_replace($pattern, $replacement, $input_str); echo "swapped printfCodes: " . $new_str . "\n"; // Try and resolve the pfrintf statement using message parameters $resolvedAssert = vsprintf($new_str, $messageParameters); if (!empty($resolvedAssert) && $resolvedAssert != $new_str) { $final_str = $resolvedAssert; echo "finalStr " . $final_str . "\n"; } } } print_r( $messageParameters);
Output for git.master, git.master_jit
Warning: Undefined variable $assert in /in/69fqJ on line 17 Warning: Trying to access array offset on value of type null in /in/69fqJ on line 17 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/69fqJ:17 Stack trace: #0 {main} thrown in /in/69fqJ on line 17
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $assert in /in/69fqJ on line 17 Warning: Trying to access array offset on null in /in/69fqJ on line 17 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/69fqJ:17 Stack trace: #0 {main} thrown in /in/69fqJ on line 17
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
44.02 ms | 401 KiB | 8 Q