3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sMicrotime = microtime(true); $sMsgId = preg_replace('/^.+\./', '', $sMicrotime); $sDatetime = date('YmdHis').str_pad(preg_replace('/^.+\./', '', $sMicrotime), 4, '0', STR_PAD_LEFT); echo '<pre>'; var_dump($sMicrotime); var_dump($sMsgId); var_dump($sDatetime); echo '</pre>';
Output for 7.0.3, 7.1.0
<pre>float(1391394378.0036) string(4) "0036" string(18) "201402030326180036" </pre>
Output for 5.4.19, 5.4.21, 5.4.24, 5.4.30, 5.4.45, 5.5.35, 5.6.0, 5.6.8, 5.6.16, 7.0.8 - 7.0.9, 7.0.14
<pre>float(1391394378.0037) string(4) "0037" string(18) "201402030326180037" </pre>
Output for 5.5.23, 7.0.10
<pre>float(1391394378.0039) string(4) "0039" string(18) "201402030326180039" </pre>
Output for 5.5.13, 5.5.33, 5.6.5, 5.6.7, 7.0.0, 7.0.7
<pre>float(1391394378.0043) string(4) "0043" string(18) "201402030326180043" </pre>
Output for 5.4.20, 5.4.35, 5.4.39 - 5.4.40, 5.4.44, 5.5.6 - 5.5.7, 5.5.10, 5.5.22, 5.5.28, 7.0.4, 7.0.6
<pre>float(1391394378.004) string(3) "004" string(18) "201402030326180004" </pre>
Output for 5.5.30, 5.6.4, 7.0.2, 7.0.5
<pre>float(1391394378.0033) string(4) "0033" string(18) "201402030326180033" </pre>
Output for 5.4.27, 5.4.42, 5.5.2, 5.5.14, 5.5.38, 5.6.15, 7.0.1
<pre>float(1391394378.0035) string(4) "0035" string(18) "201402030326180035" </pre>
Output for hhvm-3.12.0
<pre>float(1391394378.1708) string(4) "1708" string(18) "201402030326181708" </pre>
Output for hhvm-3.10.0
<pre>float(1391394378.1616) string(4) "1616" string(18) "201402030326181616" </pre>
Output for 5.5.0, 5.5.12, 5.5.15, 5.6.9, 5.6.28
<pre>float(1391394378.0045) string(4) "0045" string(18) "201402030326180045" </pre>
Output for 5.5.11, 5.5.20, 5.5.34, 5.6.11, 5.6.22, 5.6.25
<pre>float(1391394378.0042) string(4) "0042" string(18) "201402030326180042" </pre>
Output for 5.5.8 - 5.5.9, 5.5.16, 5.5.36, 5.6.1, 5.6.21, 5.6.24
<pre>float(1391394378.0044) string(4) "0044" string(18) "201402030326180044" </pre>
Output for 5.6.17 - 5.6.18, 5.6.23
<pre>float(1391394378.0047) string(4) "0047" string(18) "201402030326180047" </pre>
Output for 5.6.20
<pre>float(1391394378.0049) string(4) "0049" string(18) "201402030326180049" </pre>
Output for 5.5.25, 5.5.27, 5.5.29, 5.5.31, 5.5.37, 5.6.13, 5.6.19
<pre>float(1391394378.0046) string(4) "0046" string(18) "201402030326180046" </pre>
Output for 5.4.31, 5.4.38, 5.6.14
<pre>float(1391394378.0041) string(4) "0041" string(18) "201402030326180041" </pre>
Output for 5.4.15, 5.4.26, 5.6.12
<pre>float(1391394378.003) string(3) "003" string(18) "201402030326180003" </pre>
Output for 5.4.28, 5.5.18, 5.6.2, 5.6.10
<pre>float(1391394378.0034) string(4) "0034" string(18) "201402030326180034" </pre>
Output for 5.3.24, 5.4.25, 5.5.1, 5.6.6
<pre>float(1391394378.0031) string(4) "0031" string(18) "201402030326180031" </pre>
Output for 5.5.21, 5.6.3
<pre>float(1391394378.0029) string(4) "0029" string(18) "201402030326180029" </pre>
Output for 5.5.24, 5.5.32
<pre>float(1391394378.0048) string(4) "0048" string(18) "201402030326180048" </pre>
Output for 5.4.16, 5.4.29, 5.4.34, 5.4.37, 5.4.41, 5.4.43, 5.5.26
<pre>float(1391394378.0038) string(4) "0038" string(18) "201402030326180038" </pre>
Output for 5.4.18, 5.5.19
<pre>float(1391394378.0028) string(4) "0028" string(18) "201402030326180028" </pre>
Output for 5.5.3, 5.5.5
<pre>float(1391394378.0025) string(4) "0025" string(18) "201402030326180025" </pre>
Output for 5.3.6, 5.4.6, 5.5.4
<pre>float(1391394378.0026) string(4) "0026" string(18) "201402030326180026" </pre>
Output for 5.4.17, 5.4.36
<pre>float(1391394378.0032) string(4) "0032" string(18) "201402030326180032" </pre>
Output for 5.4.32
<pre>float(1391394378.0053) string(4) "0053" string(18) "201402030326180053" </pre>
Output for 5.4.22 - 5.4.23
<pre>float(1391394378.0027) string(4) "0027" string(18) "201402030326180027" </pre>
Output for 5.3.9, 5.3.12, 5.3.21, 5.4.8, 5.4.12, 5.4.14
<pre>float(1391394378.0021) string(4) "0021" string(18) "201402030326180021" </pre>
Output for 5.1.3 - 5.1.4, 5.2.2, 5.2.4, 5.2.10, 5.3.5, 5.3.17, 5.3.22, 5.4.4, 5.4.13
<pre>float(1391394378.0017) string(4) "0017" string(18) "201402030326180017" </pre>
Output for 5.3.0, 5.3.4, 5.3.13, 5.3.19, 5.3.26, 5.4.0, 5.4.3, 5.4.11
<pre>float(1391394378.0023) string(4) "0023" string(18) "201402030326180023" </pre>
Output for 5.3.1, 5.3.3, 5.3.8, 5.3.25, 5.4.5, 5.4.10
<pre>float(1391394378.0024) string(4) "0024" string(18) "201402030326180024" </pre>
Output for 5.2.3, 5.2.9, 5.3.2, 5.3.14 - 5.3.15, 5.3.18, 5.3.23, 5.4.9
<pre>float(1391394378.002) string(3) "002" string(18) "201402030326180002" </pre>
Output for 5.3.7, 5.3.16, 5.3.20, 5.3.28, 5.4.1, 5.4.7
<pre>float(1391394378.0022) string(4) "0022" string(18) "201402030326180022" </pre>
Output for 5.2.12 - 5.2.13, 5.3.10 - 5.3.11, 5.4.2
<pre>float(1391394378.0019) string(4) "0019" string(18) "201402030326180019" </pre>
Output for 5.1.2, 5.2.1, 5.2.5, 5.2.8, 5.2.11, 5.2.14, 5.3.29
<pre>float(1391394378.0018) string(4) "0018" string(18) "201402030326180018" </pre>
Output for 5.1.0 - 5.1.1, 5.1.5, 5.2.6, 5.2.15, 5.3.27
<pre>float(1391394378.0015) string(4) "0015" string(18) "201402030326180015" </pre>
Output for 5.1.6 - 5.2.0, 5.2.17
<pre>float(1391394378.0016) string(4) "0016" string(18) "201402030326180016" </pre>
Output for 5.2.16
<pre>float(1391394378.0014) string(4) "0014" string(18) "201402030326180014" </pre>
Output for 5.2.7
<pre>float(1391394378.0012) string(4) "0012" string(18) "201402030326180012" </pre>
Output for 5.0.0 - 5.0.2, 5.0.4 - 5.0.5
<pre>float(1391394378.0007) string(4) "0007" string(18) "201402030326180007" </pre>
Output for 5.0.3
<pre>float(1391394378.0006) string(4) "0006" string(18) "201402030326180006" </pre>
Output for 4.4.9
<pre>string(21) "0.00013000 1391394378" string(19) "00013000 1391394378" string(33) "2014020303261800013000 1391394378" </pre>
Output for 4.4.8
<pre>string(21) "0.00012700 1391394378" string(19) "00012700 1391394378" string(33) "2014020303261800012700 1391394378" </pre>
Output for 4.4.7
<pre>string(21) "0.00011100 1391394378" string(19) "00011100 1391394378" string(33) "2014020303261800011100 1391394378" </pre>
Output for 4.3.5, 4.4.6
<pre>string(21) "0.00012500 1391394378" string(19) "00012500 1391394378" string(33) "2014020303261800012500 1391394378" </pre>
Output for 4.3.3, 4.3.6, 4.4.5
<pre>string(21) "0.00013600 1391394378" string(19) "00013600 1391394378" string(33) "2014020303261800013600 1391394378" </pre>
Output for 4.4.4
<pre>string(21) "0.00011700 1391394378" string(19) "00011700 1391394378" string(33) "2014020303261800011700 1391394378" </pre>
Output for 4.4.3
<pre>string(21) "0.00009100 1391394378" string(19) "00009100 1391394378" string(33) "2014020303261800009100 1391394378" </pre>
Output for 4.4.2
<pre>string(21) "0.00013700 1391394378" string(19) "00013700 1391394378" string(33) "2014020303261800013700 1391394378" </pre>
Output for 4.4.1
<pre>string(21) "0.00010300 1391394378" string(19) "00010300 1391394378" string(33) "2014020303261800010300 1391394378" </pre>
Output for 4.4.0
<pre>string(21) "0.00013200 1391394378" string(19) "00013200 1391394378" string(33) "2014020303261800013200 1391394378" </pre>
Output for 4.3.11
<pre>string(21) "0.00012200 1391394378" string(19) "00012200 1391394378" string(33) "2014020303261800012200 1391394378" </pre>
Output for 4.3.10
<pre>string(21) "0.00010600 1391394378" string(19) "00010600 1391394378" string(33) "2014020303261800010600 1391394378" </pre>
Output for 4.3.9
<pre>string(21) "0.00010200 1391394378" string(19) "00010200 1391394378" string(33) "2014020303261800010200 1391394378" </pre>
Output for 4.3.8
<pre>string(21) "0.00013100 1391394378" string(19) "00013100 1391394378" string(33) "2014020303261800013100 1391394378" </pre>
Output for 4.3.7
<pre>string(21) "0.00016200 1391394378" string(19) "00016200 1391394378" string(33) "2014020303261800016200 1391394378" </pre>
Output for 4.3.4
<pre>string(21) "0.00013800 1391394378" string(19) "00013800 1391394378" string(33) "2014020303261800013800 1391394378" </pre>
Output for 4.3.2
<pre>string(21) "0.00011600 1391394378" string(19) "00011600 1391394378" string(33) "2014020303261800011600 1391394378" </pre>
Output for 4.3.1
<pre>string(21) "0.00015000 1391394378" string(19) "00015000 1391394378" string(33) "2014020303261800015000 1391394378" </pre>
Output for 4.3.0
<pre>string(21) "0.00010400 1391394378" string(19) "00010400 1391394378" string(33) "2014020303261800010400 1391394378" </pre>