3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $time = microtime(true); for ($i = 0; $i < 1000000; $i++) { preg_match('/^label-(.+)/', 'label-en_US', $matches); } $time = microtime(true) - $time; echo 'preg_match() took ' . number_format($time, 3) . ' seconds' . "\n"; $time = microtime(true); for ($i = 0; $i < 10000; $i++) { strpos('label', 'label-en_US'); explode('-', 'label-en_US'); } $time = microtime(true) - $time; echo 'explode() took ' . number_format($time, 3) . ' seconds' . "\n";
Output for 7.1.0
preg_match() took 0.184 seconds explode() took 0.001 seconds
Output for 7.0.14
preg_match() took 0.258 seconds explode() took 0.001 seconds
Output for 7.0.10
preg_match() took 0.292 seconds explode() took 0.001 seconds
Output for 7.0.9
preg_match() took 0.304 seconds explode() took 0.001 seconds
Output for 7.0.8
preg_match() took 0.277 seconds explode() took 0.001 seconds
Output for 7.0.6 - 7.0.7
preg_match() took 0.281 seconds explode() took 0.001 seconds
Output for 7.0.5
preg_match() took 0.261 seconds explode() took 0.001 seconds
Output for 7.0.4
preg_match() took 0.284 seconds explode() took 0.001 seconds
Output for 7.0.3
preg_match() took 0.279 seconds explode() took 0.001 seconds
Output for 7.0.2
preg_match() took 0.297 seconds explode() took 0.001 seconds
Output for 7.0.1
preg_match() took 0.305 seconds explode() took 0.001 seconds
Output for 7.0.0
preg_match() took 0.294 seconds explode() took 0.001 seconds
Output for hhvm-3.12.0
preg_match() took 0.470 seconds explode() took 0.005 seconds
Output for hhvm-3.10.0
preg_match() took 0.548 seconds explode() took 0.005 seconds
Output for 5.4.38, 5.6.28
preg_match() took 0.733 seconds explode() took 0.005 seconds
Output for 5.6.25
preg_match() took 0.605 seconds explode() took 0.005 seconds
Output for 5.6.24
preg_match() took 0.706 seconds explode() took 0.006 seconds
Output for 5.6.23
preg_match() took 0.602 seconds explode() took 0.005 seconds
Output for 5.6.22
preg_match() took 0.485 seconds explode() took 0.004 seconds
Output for 5.5.21, 5.6.21
preg_match() took 0.586 seconds explode() took 0.005 seconds
Output for 5.6.20
preg_match() took 0.542 seconds explode() took 0.005 seconds
Output for 5.6.19
preg_match() took 0.582 seconds explode() took 0.004 seconds
Output for 5.6.18
preg_match() took 0.515 seconds explode() took 0.004 seconds
Output for 5.6.17
preg_match() took 0.587 seconds explode() took 0.005 seconds
Output for 5.4.12, 5.4.37, 5.6.16
preg_match() took 0.574 seconds explode() took 0.005 seconds
Output for 5.6.15
preg_match() took 0.579 seconds explode() took 0.004 seconds
Output for 5.6.10, 5.6.14
preg_match() took 0.590 seconds explode() took 0.005 seconds
Output for 5.4.0, 5.4.8, 5.4.16, 5.4.19, 5.6.13
preg_match() took 0.565 seconds explode() took 0.005 seconds
Output for 5.6.12
preg_match() took 0.615 seconds explode() took 0.004 seconds
Output for 5.4.6, 5.6.11
preg_match() took 0.584 seconds explode() took 0.004 seconds
Output for 5.5.7, 5.5.11, 5.6.3, 5.6.9
preg_match() took 0.607 seconds explode() took 0.005 seconds
Output for 5.5.36, 5.6.8
preg_match() took 0.598 seconds explode() took 0.005 seconds
Output for 5.4.35, 5.6.7
preg_match() took 0.582 seconds explode() took 0.005 seconds
Output for 5.1.2, 5.6.6
preg_match() took 0.592 seconds explode() took 0.004 seconds
Output for 5.4.14, 5.4.27, 5.6.5
preg_match() took 0.581 seconds explode() took 0.005 seconds
Output for 5.6.4
preg_match() took 0.596 seconds explode() took 0.004 seconds
Output for 5.6.2
preg_match() took 0.566 seconds explode() took 0.005 seconds
Output for 5.4.29, 5.5.16, 5.6.1
preg_match() took 0.600 seconds explode() took 0.005 seconds
Output for 5.5.12, 5.5.30, 5.6.0
preg_match() took 0.589 seconds explode() took 0.005 seconds
Output for 5.5.13, 5.5.38
preg_match() took 0.660 seconds explode() took 0.005 seconds
Output for 5.5.25, 5.5.37
preg_match() took 0.594 seconds explode() took 0.005 seconds
Output for 5.5.35
preg_match() took 0.578 seconds explode() took 0.005 seconds
Output for 5.5.34
preg_match() took 0.542 seconds explode() took 0.004 seconds
Output for 5.5.33
preg_match() took 0.476 seconds explode() took 0.004 seconds
Output for 5.5.32
preg_match() took 0.475 seconds explode() took 0.004 seconds
Output for 5.5.31
preg_match() took 0.596 seconds explode() took 0.005 seconds
Output for 5.5.29
preg_match() took 0.612 seconds explode() took 0.005 seconds
Output for 5.5.28
preg_match() took 0.585 seconds explode() took 0.005 seconds
Output for 5.4.24, 5.5.27
preg_match() took 0.584 seconds explode() took 0.005 seconds
Output for 5.5.26
preg_match() took 0.580 seconds explode() took 0.005 seconds
Output for 5.5.24
preg_match() took 0.623 seconds explode() took 0.005 seconds
Output for 5.5.23
preg_match() took 0.583 seconds explode() took 0.005 seconds
Output for 5.5.22
preg_match() took 0.645 seconds explode() took 0.005 seconds
Output for 5.5.20
preg_match() took 0.588 seconds explode() took 0.005 seconds
Output for 5.5.19
preg_match() took 0.595 seconds explode() took 0.005 seconds
Output for 5.5.18
preg_match() took 0.621 seconds explode() took 0.005 seconds
Output for 5.5.15
preg_match() took 0.536 seconds explode() took 0.004 seconds
Output for 5.5.14
preg_match() took 0.611 seconds explode() took 0.005 seconds
Output for 5.4.7, 5.4.25, 5.5.10
preg_match() took 0.571 seconds explode() took 0.005 seconds
Output for 5.5.9
preg_match() took 0.601 seconds explode() took 0.005 seconds
Output for 5.5.8
preg_match() took 0.597 seconds explode() took 0.005 seconds
Output for 5.5.6
preg_match() took 0.591 seconds explode() took 0.005 seconds
Output for 5.5.5
preg_match() took 0.563 seconds explode() took 0.004 seconds
Output for 5.5.4
preg_match() took 0.478 seconds explode() took 0.004 seconds
Output for 5.4.22, 5.5.3
preg_match() took 0.610 seconds explode() took 0.005 seconds
Output for 5.5.2
preg_match() took 0.576 seconds explode() took 0.005 seconds
Output for 5.5.1
preg_match() took 0.503 seconds explode() took 0.004 seconds
Output for 5.5.0
preg_match() took 0.618 seconds explode() took 0.005 seconds
Output for 5.4.4, 5.4.18, 5.4.45
preg_match() took 0.556 seconds explode() took 0.005 seconds
Output for 5.3.4, 5.3.28, 5.4.44
preg_match() took 0.646 seconds explode() took 0.005 seconds
Output for 5.4.43
preg_match() took 0.628 seconds explode() took 0.005 seconds
Output for 5.4.42
preg_match() took 0.570 seconds explode() took 0.005 seconds
Output for 5.4.41
preg_match() took 0.567 seconds explode() took 0.004 seconds
Output for 5.4.40
preg_match() took 0.555 seconds explode() took 0.005 seconds
Output for 5.4.39
preg_match() took 0.500 seconds explode() took 0.004 seconds
Output for 5.3.25, 5.4.36
preg_match() took 0.638 seconds explode() took 0.005 seconds
Output for 5.4.11, 5.4.34
preg_match() took 0.592 seconds explode() took 0.005 seconds
Output for 5.4.32
preg_match() took 0.502 seconds explode() took 0.004 seconds
Output for 5.4.31
preg_match() took 0.554 seconds explode() took 0.005 seconds
Output for 5.4.30
preg_match() took 0.604 seconds explode() took 0.005 seconds
Output for 5.4.28
preg_match() took 0.551 seconds explode() took 0.005 seconds
Output for 5.4.26
preg_match() took 0.541 seconds explode() took 0.005 seconds
Output for 5.4.23
preg_match() took 0.593 seconds explode() took 0.005 seconds
Output for 5.4.21
preg_match() took 0.505 seconds explode() took 0.004 seconds
Output for 5.4.20
preg_match() took 0.560 seconds explode() took 0.005 seconds
Output for 5.4.17
preg_match() took 0.562 seconds explode() took 0.005 seconds
Output for 5.4.15
preg_match() took 0.645 seconds explode() took 0.004 seconds
Output for 5.4.13
preg_match() took 0.535 seconds explode() took 0.004 seconds
Output for 5.4.10
preg_match() took 0.619 seconds explode() took 0.005 seconds
Output for 5.4.9
preg_match() took 0.750 seconds explode() took 0.005 seconds
Output for 5.4.5
preg_match() took 0.550 seconds explode() took 0.005 seconds
Output for 5.4.3
preg_match() took 0.549 seconds explode() took 0.004 seconds
Output for 5.4.2
preg_match() took 0.564 seconds explode() took 0.005 seconds
Output for 5.4.1
preg_match() took 0.557 seconds explode() took 0.004 seconds
Output for 5.3.29
preg_match() took 0.708 seconds explode() took 0.005 seconds
Output for 5.3.27
preg_match() took 0.652 seconds explode() took 0.005 seconds
Output for 5.3.26
preg_match() took 0.636 seconds explode() took 0.005 seconds
Output for 5.3.11, 5.3.24
preg_match() took 0.685 seconds explode() took 0.005 seconds
Output for 5.3.23
preg_match() took 0.661 seconds explode() took 0.005 seconds
Output for 5.3.22
preg_match() took 0.604 seconds explode() took 0.004 seconds
Output for 5.3.21
preg_match() took 0.671 seconds explode() took 0.005 seconds
Output for 5.3.16, 5.3.20
preg_match() took 0.656 seconds explode() took 0.005 seconds
Output for 5.3.19
preg_match() took 0.658 seconds explode() took 0.005 seconds
Output for 5.3.18
preg_match() took 0.665 seconds explode() took 0.005 seconds
Output for 5.3.17
preg_match() took 0.659 seconds explode() took 0.005 seconds
Output for 5.3.15
preg_match() took 0.726 seconds explode() took 0.007 seconds
Output for 5.3.14
preg_match() took 0.682 seconds explode() took 0.005 seconds
Output for 5.3.13
preg_match() took 0.657 seconds explode() took 0.005 seconds
Output for 5.3.12
preg_match() took 0.673 seconds explode() took 0.006 seconds
Output for 5.3.10
preg_match() took 0.650 seconds explode() took 0.005 seconds
Output for 5.3.9
preg_match() took 0.655 seconds explode() took 0.005 seconds
Output for 5.3.8
preg_match() took 0.641 seconds explode() took 0.005 seconds
Output for 5.3.7
preg_match() took 0.773 seconds explode() took 0.005 seconds
Output for 5.2.6, 5.3.6
preg_match() took 0.687 seconds explode() took 0.005 seconds
Output for 5.3.5
preg_match() took 0.720 seconds explode() took 0.005 seconds
Output for 5.3.3
preg_match() took 0.763 seconds explode() took 0.005 seconds
Output for 5.3.2
preg_match() took 0.651 seconds explode() took 0.006 seconds
Output for 5.2.11, 5.3.1
preg_match() took 0.677 seconds explode() took 0.005 seconds
Output for 5.3.0
preg_match() took 0.663 seconds explode() took 0.005 seconds
Output for 5.2.17
preg_match() took 0.668 seconds explode() took 0.005 seconds
Output for 5.2.8, 5.2.16
preg_match() took 0.678 seconds explode() took 0.005 seconds
Output for 5.2.15
preg_match() took 0.729 seconds explode() took 0.005 seconds
Output for 5.2.14
preg_match() took 0.718 seconds explode() took 0.004 seconds
Output for 5.2.13
preg_match() took 0.692 seconds explode() took 0.005 seconds
Output for 5.2.12
preg_match() took 0.698 seconds explode() took 0.005 seconds
Output for 5.2.10
preg_match() took 0.674 seconds explode() took 0.005 seconds
Output for 5.2.9
preg_match() took 0.800 seconds explode() took 0.005 seconds
Output for 5.2.7
preg_match() took 0.676 seconds explode() took 0.005 seconds
Output for 5.2.2, 5.2.5
preg_match() took 0.740 seconds explode() took 0.005 seconds
Output for 5.2.4
preg_match() took 0.738 seconds explode() took 0.005 seconds
Output for 4.4.6, 5.2.3
preg_match() took 0.778 seconds explode() took 0.005 seconds
Output for 5.2.1
preg_match() took 0.552 seconds explode() took 0.004 seconds
Output for 5.2.0
preg_match() took 0.673 seconds explode() took 0.005 seconds
Output for 5.1.6
preg_match() took 0.701 seconds explode() took 0.005 seconds
Output for 5.1.5
preg_match() took 0.540 seconds explode() took 0.004 seconds
Output for 5.1.4
preg_match() took 0.617 seconds explode() took 0.004 seconds
Output for 5.1.3
preg_match() took 0.603 seconds explode() took 0.004 seconds
Output for 5.1.1
preg_match() took 0.673 seconds explode() took 0.004 seconds
Output for 5.1.0
preg_match() took 0.681 seconds explode() took 0.004 seconds
Output for 5.0.5
preg_match() took 0.893 seconds explode() took 0.006 seconds
Output for 5.0.4
preg_match() took 0.810 seconds explode() took 0.006 seconds
Output for 5.0.3
preg_match() took 0.817 seconds explode() took 0.006 seconds
Output for 5.0.2
preg_match() took 0.808 seconds explode() took 0.006 seconds
Output for 4.4.3, 5.0.1
preg_match() took 0.794 seconds explode() took 0.005 seconds
Output for 5.0.0
preg_match() took 0.788 seconds explode() took 0.006 seconds
Output for 4.4.9
preg_match() took 0.885 seconds explode() took 0.006 seconds
Output for 4.4.8
preg_match() took 0.822 seconds explode() took 0.005 seconds
Output for 4.4.7
preg_match() took 0.818 seconds explode() took 0.005 seconds
Output for 4.4.5
preg_match() took 0.693 seconds explode() took 0.005 seconds
Output for 4.4.4
preg_match() took 0.788 seconds explode() took 0.005 seconds
Output for 4.4.2
preg_match() took 0.874 seconds explode() took 0.006 seconds
Output for 4.4.1
preg_match() took 0.838 seconds explode() took 0.006 seconds
Output for 4.4.0
preg_match() took 0.862 seconds explode() took 0.006 seconds
Output for 4.3.11
preg_match() took 0.766 seconds explode() took 0.006 seconds
Output for 4.3.10
preg_match() took 0.773 seconds explode() took 0.006 seconds
Output for 4.3.9
preg_match() took 0.825 seconds explode() took 0.006 seconds
Output for 4.3.8
preg_match() took 0.779 seconds explode() took 0.006 seconds
Output for 4.3.7
preg_match() took 0.783 seconds explode() took 0.006 seconds
Output for 4.3.5 - 4.3.6
preg_match() took 0.774 seconds explode() took 0.006 seconds
Output for 4.3.4
preg_match() took 0.785 seconds explode() took 0.006 seconds
Output for 4.3.3
preg_match() took 0.751 seconds explode() took 0.006 seconds
Output for 4.3.2
preg_match() took 0.684 seconds explode() took 0.006 seconds
Output for 4.3.1
preg_match() took 0.667 seconds explode() took 0.006 seconds
Output for 4.3.0
preg_match() took 0.649 seconds explode() took 0.006 seconds