3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = str_repeat('a', 1e5); $start = microtime(true); for ($iter = 1e5; $iter--; ) { $result = $var === (object) $var; } $castTime = microtime(true) - $start; $start = microtime(true); for ($iter = 1e5; $iter--; ) { $result = is_object($var); } $checkTime = microtime(true) - $start; echo "Cast time:", sprintf("%0.3f ms", $castTime * 1e3), "<br>", PHP_EOL; echo "Check time:", sprintf("%0.3f ms", $checkTime * 1e3), PHP_EOL;
Output for 7.1.0
Cast time:16.349 ms<br> Check time:2.917 ms
Output for 7.0.14
Cast time:18.052 ms<br> Check time:2.583 ms
Output for 7.0.10
Cast time:12.933 ms<br> Check time:1.855 ms
Output for 7.0.9
Cast time:12.530 ms<br> Check time:1.715 ms
Output for 7.0.8
Cast time:17.644 ms<br> Check time:2.220 ms
Output for 7.0.7
Cast time:15.979 ms<br> Check time:2.097 ms
Output for 7.0.6
Cast time:12.833 ms<br> Check time:1.833 ms
Output for 7.0.5
Cast time:12.989 ms<br> Check time:1.930 ms
Output for 7.0.4
Cast time:16.537 ms<br> Check time:1.757 ms
Output for 7.0.3
Cast time:14.297 ms<br> Check time:1.733 ms
Output for 7.0.2
Cast time:17.065 ms<br> Check time:2.341 ms
Output for 7.0.1
Cast time:17.931 ms<br> Check time:2.448 ms
Output for 7.0.0
Cast time:20.250 ms<br> Check time:2.357 ms
Output for 5.6.28
Cast time:-134.773 ms<br> Check time:-6.699 ms
Output for 5.6.25
Cast time:436.991 ms<br> Check time:7.116 ms
Output for 5.6.24
Cast time:435.427 ms<br> Check time:6.998 ms
Output for 5.6.23
Cast time:441.317 ms<br> Check time:7.323 ms
Output for 5.6.22
Cast time:530.213 ms<br> Check time:8.366 ms
Output for 5.6.21
Cast time:499.073 ms<br> Check time:6.701 ms
Output for 5.6.20
Cast time:447.953 ms<br> Check time:7.456 ms
Output for 5.6.19
Cast time:456.398 ms<br> Check time:7.350 ms
Output for 5.6.18
Cast time:490.606 ms<br> Check time:7.620 ms
Output for 5.6.17
Cast time:446.381 ms<br> Check time:7.312 ms
Output for 5.6.16
Cast time:459.089 ms<br> Check time:7.261 ms
Output for 5.6.15
Cast time:444.673 ms<br> Check time:7.205 ms
Output for 5.6.14
Cast time:463.239 ms<br> Check time:7.391 ms
Output for 5.6.13
Cast time:468.640 ms<br> Check time:7.189 ms
Output for 5.6.12
Cast time:431.599 ms<br> Check time:7.389 ms
Output for 5.6.11
Cast time:463.010 ms<br> Check time:7.373 ms
Output for 5.6.10
Cast time:470.114 ms<br> Check time:7.331 ms
Output for 5.6.9
Cast time:460.151 ms<br> Check time:7.231 ms
Output for 5.6.8
Cast time:454.599 ms<br> Check time:7.333 ms
Output for 5.6.7
Cast time:445.643 ms<br> Check time:7.471 ms
Output for 5.6.6
Cast time:452.317 ms<br> Check time:7.184 ms
Output for 5.6.5
Cast time:449.031 ms<br> Check time:7.256 ms
Output for 5.6.4
Cast time:449.161 ms<br> Check time:7.155 ms
Output for 5.6.3
Cast time:470.209 ms<br> Check time:7.120 ms
Output for 5.6.2
Cast time:435.110 ms<br> Check time:7.190 ms
Output for 5.6.1
Cast time:444.403 ms<br> Check time:7.415 ms
Output for 5.6.0
Cast time:452.205 ms<br> Check time:7.648 ms
Output for 5.5.38
Cast time:404.544 ms<br> Check time:6.232 ms
Output for 5.5.37
Cast time:457.183 ms<br> Check time:7.780 ms
Output for 5.5.36
Cast time:434.539 ms<br> Check time:7.954 ms
Output for 5.5.35
Cast time:426.887 ms<br> Check time:7.683 ms
Output for 5.5.34
Cast time:467.852 ms<br> Check time:7.817 ms
Output for 5.5.33
Cast time:444.720 ms<br> Check time:7.652 ms
Output for 5.5.32
Cast time:450.755 ms<br> Check time:8.044 ms
Output for 5.5.31
Cast time:442.247 ms<br> Check time:7.634 ms
Output for 5.5.30
Cast time:463.884 ms<br> Check time:7.717 ms
Output for 5.5.29
Cast time:454.023 ms<br> Check time:7.684 ms
Output for 5.5.28
Cast time:443.374 ms<br> Check time:7.908 ms
Output for 5.5.27
Cast time:447.379 ms<br> Check time:7.798 ms
Output for 5.5.26
Cast time:452.510 ms<br> Check time:7.708 ms
Output for 5.5.25
Cast time:490.598 ms<br> Check time:7.605 ms
Output for 5.5.24
Cast time:462.420 ms<br> Check time:7.654 ms
Output for 5.5.23
Cast time:465.047 ms<br> Check time:7.772 ms
Output for 5.5.22
Cast time:436.190 ms<br> Check time:8.569 ms
Output for 5.5.21
Cast time:440.797 ms<br> Check time:7.712 ms
Output for 5.5.20
Cast time:445.164 ms<br> Check time:7.684 ms
Output for 5.5.19
Cast time:461.693 ms<br> Check time:7.852 ms
Output for 5.5.18
Cast time:435.340 ms<br> Check time:7.963 ms
Output for 5.5.16
Cast time:491.842 ms<br> Check time:12.400 ms
Output for 5.5.15
Cast time:436.186 ms<br> Check time:7.929 ms
Output for 5.5.14
Cast time:447.743 ms<br> Check time:7.794 ms
Output for 5.5.13
Cast time:436.205 ms<br> Check time:7.799 ms
Output for 5.5.12
Cast time:454.273 ms<br> Check time:7.675 ms
Output for 5.5.11
Cast time:447.731 ms<br> Check time:7.781 ms
Output for 5.5.10
Cast time:486.336 ms<br> Check time:7.666 ms
Output for 5.5.9
Cast time:401.248 ms<br> Check time:6.354 ms
Output for 5.5.8
Cast time:432.081 ms<br> Check time:6.217 ms
Output for 5.5.7
Cast time:406.669 ms<br> Check time:7.809 ms
Output for 5.5.6
Cast time:419.166 ms<br> Check time:9.084 ms
Output for 5.5.5
Cast time:368.417 ms<br> Check time:6.267 ms
Output for 5.5.4
Cast time:451.180 ms<br> Check time:7.776 ms
Output for 5.5.3
Cast time:438.130 ms<br> Check time:7.856 ms
Output for 5.5.2
Cast time:458.049 ms<br> Check time:7.701 ms
Output for 5.5.1
Cast time:478.217 ms<br> Check time:7.560 ms
Output for 5.5.0
Cast time:452.180 ms<br> Check time:7.239 ms
Output for 5.4.45
Cast time:516.649 ms<br> Check time:8.420 ms
Output for 5.4.44
Cast time:476.852 ms<br> Check time:8.439 ms
Output for 5.4.43
Cast time:459.994 ms<br> Check time:7.594 ms
Output for 5.4.42
Cast time:448.741 ms<br> Check time:7.735 ms
Output for 5.4.41
Cast time:439.889 ms<br> Check time:8.003 ms
Output for 5.4.40
Cast time:509.124 ms<br> Check time:9.218 ms
Output for 5.4.39
Cast time:455.547 ms<br> Check time:7.930 ms
Output for 5.4.38
Cast time:479.068 ms<br> Check time:7.679 ms
Output for 5.4.37
Cast time:480.890 ms<br> Check time:7.730 ms
Output for 5.4.36
Cast time:453.445 ms<br> Check time:7.690 ms
Output for 5.4.35
Cast time:436.679 ms<br> Check time:8.062 ms
Output for 5.4.34
Cast time:441.082 ms<br> Check time:8.528 ms
Output for 5.4.32
Cast time:459.616 ms<br> Check time:7.713 ms
Output for 5.4.31
Cast time:452.156 ms<br> Check time:7.645 ms
Output for 5.4.30
Cast time:448.801 ms<br> Check time:7.641 ms
Output for 5.4.29
Cast time:523.839 ms<br> Check time:10.456 ms
Output for 5.4.28
Cast time:434.975 ms<br> Check time:7.745 ms
Output for 5.4.27
Cast time:436.996 ms<br> Check time:7.803 ms
Output for 5.4.26
Cast time:473.619 ms<br> Check time:7.705 ms
Output for 5.4.25
Cast time:482.025 ms<br> Check time:7.755 ms
Output for 5.4.24
Cast time:430.528 ms<br> Check time:7.749 ms
Output for 5.4.23
Cast time:414.636 ms<br> Check time:7.907 ms
Output for 5.4.22
Cast time:364.959 ms<br> Check time:6.256 ms
Output for 5.4.21
Cast time:420.023 ms<br> Check time:6.822 ms
Output for 5.4.20
Cast time:459.128 ms<br> Check time:7.794 ms
Output for 5.4.19
Cast time:458.348 ms<br> Check time:7.830 ms
Output for 5.4.18
Cast time:439.935 ms<br> Check time:7.982 ms
Output for 5.4.17
Cast time:460.540 ms<br> Check time:7.716 ms
Output for 5.4.16
Cast time:429.265 ms<br> Check time:9.158 ms
Output for 5.4.15
Cast time:454.804 ms<br> Check time:7.626 ms
Output for 5.4.14
Cast time:492.717 ms<br> Check time:7.990 ms
Output for 5.4.13
Cast time:451.130 ms<br> Check time:7.973 ms
Output for 5.4.12
Cast time:459.057 ms<br> Check time:7.733 ms
Output for 5.4.11
Cast time:455.905 ms<br> Check time:7.878 ms
Output for 5.4.10
Cast time:449.844 ms<br> Check time:9.047 ms
Output for 5.4.9
Cast time:493.267 ms<br> Check time:7.783 ms
Output for 5.4.8
Cast time:455.283 ms<br> Check time:8.017 ms
Output for 5.4.7
Cast time:438.012 ms<br> Check time:7.532 ms
Output for 5.4.6
Cast time:415.076 ms<br> Check time:7.825 ms
Output for 5.4.5
Cast time:439.839 ms<br> Check time:7.679 ms
Output for 5.4.4
Cast time:433.710 ms<br> Check time:7.745 ms
Output for 5.4.3
Cast time:462.812 ms<br> Check time:7.492 ms
Output for 5.4.2
Cast time:429.230 ms<br> Check time:8.715 ms
Output for 5.4.1
Cast time:431.983 ms<br> Check time:7.435 ms
Output for 5.4.0
Cast time:454.911 ms<br> Check time:7.584 ms
Output for 5.3.29
Cast time:431.015 ms<br> Check time:9.270 ms
Output for 5.3.28
Cast time:367.824 ms<br> Check time:7.628 ms
Output for 5.3.27
Cast time:444.038 ms<br> Check time:9.326 ms
Output for 5.3.26
Cast time:449.548 ms<br> Check time:9.095 ms
Output for 5.3.25
Cast time:425.496 ms<br> Check time:9.404 ms
Output for 5.3.24
Cast time:421.573 ms<br> Check time:7.722 ms
Output for 5.3.23
Cast time:456.863 ms<br> Check time:9.400 ms
Output for 5.3.22
Cast time:441.378 ms<br> Check time:9.071 ms
Output for 5.3.21
Cast time:431.153 ms<br> Check time:9.371 ms
Output for 5.3.20
Cast time:576.966 ms<br> Check time:9.242 ms
Output for 5.3.19
Cast time:435.098 ms<br> Check time:9.796 ms
Output for 5.3.18
Cast time:436.419 ms<br> Check time:9.049 ms
Output for 5.3.17
Cast time:448.285 ms<br> Check time:9.529 ms
Output for 5.3.16
Cast time:417.589 ms<br> Check time:8.785 ms
Output for 5.3.15
Cast time:443.501 ms<br> Check time:9.094 ms
Output for 5.3.14
Cast time:446.290 ms<br> Check time:9.167 ms
Output for 5.3.13
Cast time:480.393 ms<br> Check time:9.140 ms
Output for 5.3.12
Cast time:467.401 ms<br> Check time:9.325 ms
Output for 5.3.11
Cast time:458.286 ms<br> Check time:9.256 ms
Output for 5.3.10
Cast time:479.193 ms<br> Check time:9.035 ms
Output for 5.3.9
Cast time:424.309 ms<br> Check time:9.027 ms
Output for 5.3.8
Cast time:434.436 ms<br> Check time:8.984 ms
Output for 5.3.7
Cast time:448.847 ms<br> Check time:9.711 ms
Output for 5.3.6
Cast time:420.878 ms<br> Check time:9.098 ms
Output for 5.3.5
Cast time:470.965 ms<br> Check time:9.734 ms
Output for 5.3.4
Cast time:448.427 ms<br> Check time:7.694 ms
Output for 5.3.3
Cast time:472.641 ms<br> Check time:9.235 ms
Output for 5.3.2
Cast time:437.631 ms<br> Check time:9.170 ms
Output for 5.3.1
Cast time:459.349 ms<br> Check time:9.711 ms
Output for 5.3.0
Cast time:503.847 ms<br> Check time:8.989 ms
Output for 5.2.17
Cast time:448.516 ms<br> Check time:9.731 ms
Output for 5.2.16
Cast time:504.311 ms<br> Check time:10.000 ms
Output for 5.2.15
Cast time:438.845 ms<br> Check time:10.034 ms
Output for 5.2.14
Cast time:456.887 ms<br> Check time:9.791 ms
Output for 5.2.13
Cast time:440.705 ms<br> Check time:10.232 ms
Output for 5.2.12
Cast time:454.830 ms<br> Check time:9.803 ms
Output for 5.2.11
Cast time:461.295 ms<br> Check time:9.661 ms
Output for 5.2.10
Cast time:461.819 ms<br> Check time:10.095 ms
Output for 5.2.9
Cast time:452.113 ms<br> Check time:10.011 ms
Output for 5.2.8
Cast time:470.234 ms<br> Check time:10.197 ms
Output for 5.2.7
Cast time:421.860 ms<br> Check time:8.400 ms
Output for 5.2.6
Cast time:466.362 ms<br> Check time:9.898 ms
Output for 5.2.5
Cast time:479.050 ms<br> Check time:10.094 ms
Output for 5.2.4
Cast time:514.222 ms<br> Check time:10.027 ms
Output for 5.2.3
Cast time:453.189 ms<br> Check time:10.461 ms
Output for 5.2.2
Cast time:464.079 ms<br> Check time:9.672 ms
Output for 5.2.1
Cast time:489.827 ms<br> Check time:10.061 ms
Output for 5.2.0
Cast time:466.009 ms<br> Check time:9.968 ms
Output for 5.1.6
Cast time:454.144 ms<br> Check time:9.763 ms
Output for 5.1.5
Cast time:485.929 ms<br> Check time:9.393 ms
Output for 5.1.4
Cast time:524.896 ms<br> Check time:9.433 ms
Output for 5.1.3
Cast time:458.836 ms<br> Check time:9.755 ms
Output for 5.1.2
Cast time:466.358 ms<br> Check time:10.313 ms
Output for 5.1.1
Cast time:435.065 ms<br> Check time:9.719 ms
Output for 5.1.0
Cast time:436.579 ms<br> Check time:7.734 ms
Output for 5.0.5
Cast time:427.878 ms<br> Check time:16.056 ms
Output for 5.0.4
Cast time:372.032 ms<br> Check time:15.330 ms
Output for 5.0.3
Cast time:380.937 ms<br> Check time:14.263 ms
Output for 5.0.2
Cast time:485.970 ms<br> Check time:17.382 ms
Output for 5.0.1
Cast time:439.473 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:18.314 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 5.0.0
Cast time:447.687 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:17.915 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 4.4.9
Cast time:529.689 ms<br> Check time:16.962 ms
Output for 4.4.8
Cast time:559.832 ms<br> Check time:22.659 ms
Output for 4.4.7
Cast time:477.424 ms<br> Check time:17.042 ms
Output for 4.4.6
Cast time:510.537 ms<br> Check time:16.894 ms
Output for 4.4.5
Cast time:466.473 ms<br> Check time:17.067 ms
Output for 4.4.4
Cast time:496.319 ms<br> Check time:16.827 ms
Output for 4.4.3
Cast time:481.601 ms<br> Check time:16.849 ms
Output for 4.4.2
Cast time:491.715 ms<br> Check time:16.815 ms
Output for 4.4.1
Cast time:411.578 ms<br> Check time:13.831 ms
Output for 4.4.0
Cast time:367.451 ms<br> Check time:14.097 ms
Output for 4.3.11
Cast time:382.436 ms<br> Check time:14.518 ms
Output for 4.3.10
Cast time:462.499 ms<br> Check time:17.039 ms
Output for 4.3.9
Cast time:436.157 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:14.860 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 4.3.8
Cast time:484.402 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:16.745 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 4.3.7
Cast time:503.303 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:17.413 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 4.3.6
Cast time:483.593 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:16.626 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 4.3.5
Cast time:476.581 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:17.513 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 4.3.4
Cast time:461.631 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:16.656 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 4.3.3
Cast time:596.681 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:19.384 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 4.3.2
Cast time:630.574 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:21.650 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 4.3.1
Cast time:491.962 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:16.965 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL
Output for 4.3.0
Cast time:499.892 ms<br> Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 17 PHP_EOLCheck time:17.008 ms Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/2LOq9 on line 19 PHP_EOL