3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = new stdClass; $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:2.641 ms<br> Check time:1.818 ms
Output for 7.0.14
Cast time:4.104 ms<br> Check time:2.961 ms
Output for 7.0.12
Cast time:4.288 ms<br> Check time:3.004 ms
Output for 7.0.6
Cast time:3.853 ms<br> Check time:2.583 ms
Output for 7.0.5
Cast time:3.565 ms<br> Check time:2.542 ms
Output for 7.0.4
Cast time:3.502 ms<br> Check time:2.482 ms
Output for 7.0.3
Cast time:3.750 ms<br> Check time:2.423 ms
Output for 7.0.2
Cast time:3.256 ms<br> Check time:2.204 ms
Output for 7.0.1
Cast time:3.321 ms<br> Check time:2.318 ms
Output for 7.0.0
Cast time:3.696 ms<br> Check time:2.474 ms
Output for hhvm-3.12.0
Cast time:5.279 ms<br> Check time:3.210 ms
Output for hhvm-3.10.0
Cast time:6.308 ms<br> Check time:4.062 ms
Output for 5.6.28
Cast time:8.146 ms<br> Check time:16.647 ms
Output for 5.6.21
Cast time:5.819 ms<br> Check time:11.926 ms
Output for 5.6.20
Cast time:7.569 ms<br> Check time:15.152 ms
Output for 5.6.19
Cast time:7.924 ms<br> Check time:15.985 ms
Output for 5.6.18
Cast time:7.235 ms<br> Check time:12.301 ms
Output for 5.6.17
Cast time:4.813 ms<br> Check time:10.242 ms
Output for 5.6.16
Cast time:4.837 ms<br> Check time:10.160 ms
Output for 5.6.15
Cast time:4.810 ms<br> Check time:10.179 ms
Output for 5.6.14
Cast time:7.782 ms<br> Check time:15.463 ms
Output for 5.6.13
Cast time:5.903 ms<br> Check time:11.459 ms
Output for 5.6.12
Cast time:8.149 ms<br> Check time:15.753 ms
Output for 5.6.11
Cast time:7.746 ms<br> Check time:15.363 ms
Output for 5.6.10
Cast time:5.719 ms<br> Check time:12.090 ms
Output for 5.6.9
Cast time:4.876 ms<br> Check time:10.305 ms
Output for 5.6.8
Cast time:5.780 ms<br> Check time:11.814 ms
Output for 5.6.7
Cast time:5.924 ms<br> Check time:12.808 ms
Output for 5.6.6
Cast time:8.290 ms<br> Check time:14.322 ms
Output for 5.6.5
Cast time:7.856 ms<br> Check time:15.799 ms
Output for 5.6.4
Cast time:7.788 ms<br> Check time:15.664 ms
Output for 5.6.3
Cast time:7.618 ms<br> Check time:15.298 ms
Output for 5.6.2
Cast time:7.861 ms<br> Check time:15.664 ms
Output for 5.6.1
Cast time:8.736 ms<br> Check time:15.725 ms
Output for 5.6.0
Cast time:8.294 ms<br> Check time:16.956 ms
Output for 5.5.35
Cast time:6.988 ms<br> Check time:15.444 ms
Output for 5.5.34
Cast time:7.594 ms<br> Check time:15.353 ms
Output for 5.5.33
Cast time:5.546 ms<br> Check time:14.360 ms
Output for 5.5.32
Cast time:7.674 ms<br> Check time:16.046 ms
Output for 5.5.31
Cast time:5.872 ms<br> Check time:12.308 ms
Output for 5.5.30
Cast time:4.937 ms<br> Check time:11.849 ms
Output for 5.5.29
Cast time:7.566 ms<br> Check time:16.537 ms
Output for 5.5.28
Cast time:7.304 ms<br> Check time:13.823 ms
Output for 5.5.27
Cast time:5.476 ms<br> Check time:10.895 ms
Output for 5.5.26
Cast time:7.925 ms<br> Check time:15.657 ms
Output for 5.5.25
Cast time:5.009 ms<br> Check time:11.041 ms
Output for 5.5.24
Cast time:7.783 ms<br> Check time:15.969 ms
Output for 5.5.23
Cast time:7.965 ms<br> Check time:16.646 ms
Output for 5.5.22
Cast time:7.755 ms<br> Check time:17.339 ms
Output for 5.5.21
Cast time:7.549 ms<br> Check time:16.299 ms
Output for 5.5.20
Cast time:7.518 ms<br> Check time:14.013 ms
Output for 5.5.19
Cast time:6.729 ms<br> Check time:14.387 ms
Output for 5.5.18
Cast time:6.527 ms<br> Check time:14.878 ms
Output for 5.5.16
Cast time:7.774 ms<br> Check time:16.645 ms
Output for 5.5.15
Cast time:8.032 ms<br> Check time:16.673 ms
Output for 5.5.14
Cast time:4.754 ms<br> Check time:10.821 ms
Output for 5.5.13
Cast time:7.257 ms<br> Check time:13.642 ms
Output for 5.5.12
Cast time:7.523 ms<br> Check time:16.372 ms
Output for 5.5.11
Cast time:7.292 ms<br> Check time:13.372 ms
Output for 5.5.10
Cast time:7.488 ms<br> Check time:16.259 ms
Output for 5.5.9
Cast time:8.026 ms<br> Check time:16.567 ms
Output for 5.5.8
Cast time:5.937 ms<br> Check time:12.233 ms
Output for 5.5.7
Cast time:7.621 ms<br> Check time:16.286 ms
Output for 5.5.6
Cast time:7.376 ms<br> Check time:14.783 ms
Output for 5.5.5
Cast time:7.002 ms<br> Check time:15.618 ms
Output for 5.5.4
Cast time:6.002 ms<br> Check time:11.828 ms
Output for 5.5.3
Cast time:7.318 ms<br> Check time:15.653 ms
Output for 5.5.2
Cast time:7.062 ms<br> Check time:15.098 ms
Output for 5.5.1
Cast time:7.598 ms<br> Check time:15.747 ms
Output for 5.5.0
Cast time:5.771 ms<br> Check time:12.098 ms
Output for 5.4.45
Cast time:5.312 ms<br> Check time:12.568 ms
Output for 5.4.44
Cast time:7.403 ms<br> Check time:15.082 ms
Output for 5.4.43
Cast time:5.457 ms<br> Check time:10.452 ms
Output for 5.4.42
Cast time:4.422 ms<br> Check time:10.560 ms
Output for 5.4.41
Cast time:5.355 ms<br> Check time:12.736 ms
Output for 5.4.40
Cast time:7.777 ms<br> Check time:15.960 ms
Output for 5.4.39
Cast time:5.831 ms<br> Check time:13.193 ms
Output for 5.4.38
Cast time:7.077 ms<br> Check time:16.049 ms
Output for 5.4.37
Cast time:7.091 ms<br> Check time:15.824 ms
Output for 5.4.36
Cast time:7.613 ms<br> Check time:15.717 ms
Output for 5.4.35
Cast time:6.927 ms<br> Check time:15.982 ms
Output for 5.4.34
Cast time:6.700 ms<br> Check time:14.984 ms
Output for 5.4.32
Cast time:6.943 ms<br> Check time:15.845 ms
Output for 5.4.31
Cast time:7.158 ms<br> Check time:16.895 ms
Output for 5.4.30
Cast time:6.390 ms<br> Check time:14.905 ms
Output for 5.4.29
Cast time:7.545 ms<br> Check time:16.985 ms
Output for 5.4.28
Cast time:6.749 ms<br> Check time:15.441 ms
Output for 5.4.27
Cast time:7.022 ms<br> Check time:16.105 ms
Output for 5.4.26
Cast time:4.602 ms<br> Check time:10.806 ms
Output for 5.4.25
Cast time:4.678 ms<br> Check time:11.204 ms
Output for 5.4.24
Cast time:4.918 ms<br> Check time:10.486 ms
Output for 5.4.23
Cast time:5.548 ms<br> Check time:12.741 ms
Output for 5.4.22
Cast time:7.040 ms<br> Check time:15.871 ms
Output for 5.4.21
Cast time:6.898 ms<br> Check time:15.461 ms
Output for 5.4.20
Cast time:4.592 ms<br> Check time:10.519 ms
Output for 5.4.19
Cast time:6.134 ms<br> Check time:14.194 ms
Output for 5.4.18
Cast time:7.483 ms<br> Check time:16.917 ms
Output for 5.4.17
Cast time:5.581 ms<br> Check time:14.592 ms
Output for 5.4.16
Cast time:6.320 ms<br> Check time:14.328 ms
Output for 5.4.15
Cast time:6.400 ms<br> Check time:16.068 ms
Output for 5.4.14
Cast time:7.001 ms<br> Check time:16.346 ms
Output for 5.4.13
Cast time:6.345 ms<br> Check time:13.753 ms
Output for 5.4.12
Cast time:4.772 ms<br> Check time:11.255 ms
Output for 5.4.11
Cast time:4.562 ms<br> Check time:10.424 ms
Output for 5.4.10
Cast time:6.017 ms<br> Check time:14.783 ms
Output for 5.4.9
Cast time:6.347 ms<br> Check time:14.990 ms
Output for 5.4.8
Cast time:4.898 ms<br> Check time:10.521 ms
Output for 5.4.7
Cast time:6.908 ms<br> Check time:16.131 ms
Output for 5.4.6
Cast time:4.846 ms<br> Check time:11.192 ms
Output for 5.4.5
Cast time:7.370 ms<br> Check time:16.775 ms
Output for 5.4.4
Cast time:6.980 ms<br> Check time:15.925 ms
Output for 5.4.3
Cast time:7.302 ms<br> Check time:16.124 ms
Output for 5.4.2
Cast time:4.451 ms<br> Check time:10.461 ms
Output for 5.4.1
Cast time:4.561 ms<br> Check time:10.566 ms
Output for 5.4.0
Cast time:7.572 ms<br> Check time:16.964 ms
Output for 5.3.29
Cast time:8.051 ms<br> Check time:17.691 ms
Output for 5.3.28
Cast time:8.513 ms<br> Check time:17.958 ms
Output for 5.3.27
Cast time:7.437 ms<br> Check time:17.022 ms
Output for 5.3.26
Cast time:7.413 ms<br> Check time:17.157 ms
Output for 5.3.25
Cast time:7.360 ms<br> Check time:16.442 ms
Output for 5.3.24
Cast time:4.971 ms<br> Check time:11.861 ms
Output for 5.3.23
Cast time:5.258 ms<br> Check time:11.990 ms
Output for 5.3.22
Cast time:5.371 ms<br> Check time:12.579 ms
Output for 5.3.21
Cast time:5.840 ms<br> Check time:13.734 ms
Output for 5.3.20
Cast time:7.757 ms<br> Check time:18.132 ms
Output for 5.3.19
Cast time:8.051 ms<br> Check time:17.569 ms
Output for 5.3.18
Cast time:6.957 ms<br> Check time:16.121 ms
Output for 5.3.17
Cast time:7.408 ms<br> Check time:16.769 ms
Output for 5.3.16
Cast time:7.592 ms<br> Check time:17.578 ms
Output for 5.3.15
Cast time:8.048 ms<br> Check time:18.600 ms
Output for 5.3.14
Cast time:8.498 ms<br> Check time:18.546 ms
Output for 5.3.13
Cast time:8.200 ms<br> Check time:17.128 ms
Output for 5.3.12
Cast time:7.938 ms<br> Check time:18.425 ms
Output for 5.3.11
Cast time:4.921 ms<br> Check time:12.079 ms
Output for 5.3.10
Cast time:7.976 ms<br> Check time:15.678 ms
Output for 5.3.9
Cast time:8.277 ms<br> Check time:18.543 ms
Output for 5.3.8
Cast time:5.055 ms<br> Check time:11.759 ms
Output for 5.3.7
Cast time:8.285 ms<br> Check time:18.882 ms
Output for 5.3.6
Cast time:6.574 ms<br> Check time:15.266 ms
Output for 5.3.5
Cast time:5.105 ms<br> Check time:12.274 ms
Output for 5.3.4
Cast time:8.139 ms<br> Check time:18.925 ms
Output for 5.3.3
Cast time:7.357 ms<br> Check time:16.088 ms
Output for 5.3.2
Cast time:7.594 ms<br> Check time:17.345 ms
Output for 5.3.1
Cast time:7.649 ms<br> Check time:21.877 ms
Output for 5.3.0
Cast time:8.922 ms<br> Check time:19.670 ms
Output for 5.2.17
Cast time:5.729 ms<br> Check time:12.644 ms
Output for 5.2.16
Cast time:9.984 ms<br> Check time:21.017 ms
Output for 5.2.15
Cast time:11.358 ms<br> Check time:22.632 ms
Output for 5.2.14
Cast time:10.034 ms<br> Check time:20.966 ms
Output for 5.2.13
Cast time:9.600 ms<br> Check time:20.753 ms
Output for 5.2.12
Cast time:9.680 ms<br> Check time:20.168 ms
Output for 5.2.11
Cast time:9.763 ms<br> Check time:20.217 ms
Output for 5.2.10
Cast time:8.992 ms<br> Check time:18.809 ms
Output for 5.2.9
Cast time:17.438 ms<br> Check time:27.668 ms
Output for 5.2.8
Cast time:9.455 ms<br> Check time:20.015 ms
Output for 5.2.7
Cast time:7.953 ms<br> Check time:17.758 ms
Output for 5.2.6
Cast time:7.164 ms<br> Check time:15.829 ms
Output for 5.2.5
Cast time:8.234 ms<br> Check time:17.850 ms
Output for 5.2.4
Cast time:10.010 ms<br> Check time:21.016 ms
Output for 5.2.3
Cast time:10.066 ms<br> Check time:19.664 ms
Output for 5.2.2
Cast time:9.821 ms<br> Check time:20.347 ms
Output for 5.2.1
Cast time:9.949 ms<br> Check time:19.667 ms
Output for 5.2.0
Cast time:9.966 ms<br> Check time:19.525 ms
Output for 5.1.6
Cast time:7.015 ms<br> Check time:15.864 ms
Output for 5.1.5
Cast time:5.653 ms<br> Check time:12.409 ms
Output for 5.1.4
Cast time:10.651 ms<br> Check time:21.951 ms
Output for 5.1.3
Cast time:9.944 ms<br> Check time:18.680 ms
Output for 5.1.2
Cast time:9.953 ms<br> Check time:21.644 ms
Output for 5.1.1
Cast time:9.738 ms<br> Check time:19.738 ms
Output for 5.1.0
Cast time:8.300 ms<br> Check time:17.447 ms
Output for 5.0.5
Cast time:23.991 ms<br> Check time:32.516 ms
Output for 5.0.4
Cast time:22.187 ms<br> Check time:30.225 ms
Output for 5.0.3
Cast time:22.758 ms<br> Check time:29.848 ms
Output for 5.0.2
Cast time:24.171 ms<br> Check time:32.411 ms
Output for 5.0.1
Cast time:19.340 ms<br>PHP_EOLCheck time:25.545 msPHP_EOL
Output for 5.0.0
Cast time:22.679 ms<br>PHP_EOLCheck time:30.978 msPHP_EOL
Output for 4.4.9
Cast time:24.313 ms<br> Check time:20.250 ms
Output for 4.4.8
Cast time:24.190 ms<br> Check time:-980.537 ms
Output for 4.4.7
Cast time:43.776 ms<br> Check time:-972.782 ms
Output for 4.4.6
Cast time:30.428 ms<br> Check time:22.107 ms
Output for 4.4.5
Cast time:36.584 ms<br> Check time:25.499 ms
Output for 4.4.4
Cast time:34.206 ms<br> Check time:23.348 ms
Output for 4.4.3
Cast time:42.524 ms<br> Check time:29.166 ms
Output for 4.4.2
Cast time:37.479 ms<br> Check time:26.785 ms
Output for 4.4.1
Cast time:41.656 ms<br> Check time:25.445 ms
Output for 4.4.0
Cast time:40.840 ms<br> Check time:28.117 ms
Output for 4.3.11
Cast time:42.208 ms<br> Check time:29.885 ms
Output for 4.3.10
Cast time:35.266 ms<br> Check time:25.371 ms
Output for 4.3.9
Cast time:42.224 ms<br>PHP_EOLCheck time:28.617 msPHP_EOL
Output for 4.3.8
Cast time:40.673 ms<br>PHP_EOLCheck time:28.173 msPHP_EOL
Output for 4.3.7
Cast time:37.213 ms<br>PHP_EOLCheck time:26.219 msPHP_EOL
Output for 4.3.6
Cast time:30.983 ms<br>PHP_EOLCheck time:29.384 msPHP_EOL
Output for 4.3.5
Cast time:34.406 ms<br>PHP_EOLCheck time:24.341 msPHP_EOL
Output for 4.3.4
Cast time:40.532 ms<br>PHP_EOLCheck time:27.693 msPHP_EOL
Output for 4.3.3
Cast time:42.476 ms<br>PHP_EOLCheck time:28.213 msPHP_EOL
Output for 4.3.2
Cast time:40.513 ms<br>PHP_EOLCheck time:26.896 msPHP_EOL
Output for 4.3.1
Cast time:44.739 ms<br>PHP_EOLCheck time:28.598 msPHP_EOL
Output for 4.3.0
Cast time:23.895 ms<br>PHP_EOLCheck time:19.701 msPHP_EOL