From 44abbc56683ecc10414df6894e2220db8484e7d6 Mon Sep 17 00:00:00 2001 From: Jan Ehrhardt Date: Tue, 8 Mar 2016 22:48:09 +0100 Subject: [PATCH] #210 Windows: Autodetect V8 API & V8 Engine Compiled Version - v8js_zeroPad --- config.w32 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.w32 b/config.w32 index aed79f8..4088ec3 100644 --- a/config.w32 +++ b/config.w32 @@ -1,6 +1,11 @@ ARG_WITH("v8js", "for V8 Javascript Engine", "no"); +function v8js_zeroPad(num, places) { + var zero = places - num.toString().length + 1; + return Array(+(zero > 0 && zero)).join("0") + num; +} + if (PHP_V8JS != "no") { if (CHECK_LIB("v8_libplatform.lib", "v8js") && CHECK_LIB("v8_libbase.lib", "v8js") &&